db1119 needs to be upgraded to Bookworm
When: TBD
Impact: Read only for a few seconds on the services below:
Services running on m2:
* otrs
* debmonitor
* xhgui
* recommendationapi
* iegreview
* sockpuppet
* mwaddlink
Switchover steps:
OLD MASTER: db1119
NEW MASTER: db1195
Check configuration differences between new and old master
[x] `$ pt-config-diff h=db1119.eqiad.wmnet,F=/root/.my.cnf h=db1195.eqiad.wmnet,F=/root/.my.cnf `
[x] Silence alerts on all hosts
[x] Topology changes: move everything under db1195
`db-switchover --timeout=15 --only-slave-move db1119.eqiad.wmnet db1195.eqiad.wmnet`
[x] Disable puppet @db1119 and puppet @db1195
` sudo cumin 'db1119* or db1195*' 'disable-puppet "primary switchover T351863"'`
[x] Merge gerrit: https://gerrit.wikimedia.org/r/c/operations/puppet/+/977319
[x] Run puppet on dbproxy1023 and dbproxy1025 and check the config
`run-puppet-agent && cat /etc/haproxy/conf.d/db-master.cfg`
[x] Start the failover
`!log Failover m2 from db1119 to db1195 - T351863`
```
root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --skip-slave-move db1119 db1195
```
[x] 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
```
[x] kill connections on the old master (db1119)
` pt-kill --print --kill --victims all --match-all F=/dev/null,S=/run/mysqld/mysqld.sock`
[x] Restart puppet on old and new masters (for heartbeat): db1119 and db1195
`sudo cumin 'db1119* or db1195*' 'run-puppet-agent "primary switchover T351863"'`
[] Check services affected (otrs, debmonitor etc)
[x] Clean orchestrator heartbeat to remove the old masters' one:
** `sudo db-mysql db1195 heartbeat -e "delete from heartbeat where file like 'db1119%';"`
[] Update/resolve phabricator ticket about failover