db1183 needs to be reimaged to Bullseye.
Let's promote db1159 to master
When: TBD
Impact: Read only for a few seconds on the services below:
Services running on m2:
* otrs
* debmonitor
* xhgui
* recommendationapi
* iegreview
* scholarships
* sockpuppet
* mwaddlink
Switchover steps:
OLD MASTER: db1183
NEW MASTER: db1159
Check configuration differences between new and old master
[] `$ pt-config-diff h=db1159.eqiad.wmnet,F=/root/.my.cnf h=db1183.eqiad.wmnet,F=/root/.my.cnf `
[] Silence alerts on all hosts
[] Topology changes: move everything under db1159
`db-switchover --timeout=1 --only-slave-move db1183.eqiad.wmnet db1159.eqiad.wmnet`
[] Disable puppet @db1183 and puppet @db1159
`puppet agent --disable "switchover to db1159"`
[] Merge gerrit: TO-DO
[] Run puppet on dbproxy1013 and dbproxy1015 and check the config
`puppet agent -tv && cat /etc/haproxy/conf.d/db-master.cfg`
[] Start the failover
`!log Failover m2 from db1183 to db1159 - T300329`
```
root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --skip-slave-move db1183 db1159
```
[] Reload haproxies
```
dbproxy1013: systemctl reload haproxy && echo "show stat" | socat /run/haproxy/haproxy.sock stdio
dbproxy1015: systemctl reload haproxy && echo "show stat" | socat /run/haproxy/haproxy.sock stdio
```
[] kill connections on the old master (db1183)
` pt-kill --print --kill --victims all --match-all F=/dev/null,S=/run/mysqld/mysqld.sock`
[] Restart puppet on old and new masters (for heartbeat): db1183 and db1159
` puppet agent --enable && run-puppet-agent`
[] Check services affected (librenms, racktables, etherpad...)
[] Clean orchestrator heartbeat to remove the old masters' one.
[] Create floating ticket for db1183 to be moved to m3: TO-DO
[] Update/resolve phabricator ticket about failover