db1183 needs to be reimaged to Bullseye.
Let's promote db1159 to master
When: Thursday 3rd Feb at 9:00AM UTC
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: https://gerrit.wikimedia.org/r/c/operations/puppet/+/759222/
- 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 (otrs, debmonitor etc)
- Clean orchestrator heartbeat to remove the old masters' one:
- server_id=171970778
- Create floating ticket for db1183 to be moved to m3: T300835
- Update/resolve phabricator ticket about failover