db1164 needs to be rebooted
Let's promote db1195 to master
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: db1164
NEW MASTER: db1195
Check configuration differences between new and old master
- $ pt-config-diff h=db1164.eqiad.wmnet,F=/root/.my.cnf h=db1195.eqiad.wmnet,F=/root/.my.cnf
- Silence alerts on all hosts
- Topology changes: move everything under db1195
db-switchover --timeout=1 --only-slave-move db1164.eqiad.wmnet db1195.eqiad.wmnet
- Disable puppet @db1164 and puppet @db1195 sudo cumin 'db1164* or db1195*' 'disable-puppet "primary switchover T328253"'
- Merge gerrit: https://gerrit.wikimedia.org/r/c/operations/puppet/+/885265/
- 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 db1164 to db1195 - T328253
root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --skip-slave-move db1164 db1195
- 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 (db1164)
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): db1164 and db1195
puppet agent --enable && run-puppet-agent
- Check services affected (otrs, debmonitor etc)
- Clean orchestrator heartbeat to remove the old masters' one:
- server_id=171966512
- Create floating ticket for db1164 to be moved to m3: T328402
- Update/resolve phabricator ticket about failover