db1159 needs to be rebooted
Let's promote db1164 to master
When: Monday 29th Aug at 8:30AM UTC
Impact: Read only for a few seconds on the services below:
Services running on m2:
- otrs
- debmonitor
- xhgui
- recommendationapi
- iegreview
- scholarships T243037: Shutdown scholarships.wikimedia.org and archive project
- sockpuppet
- mwaddlink
Switchover steps:
OLD MASTER: db1159
NEW MASTER: db1164
Check configuration differences between new and old master
- $ pt-config-diff h=db1159.eqiad.wmnet,F=/root/.my.cnf h=db1164.eqiad.wmnet,F=/root/.my.cnf
- Silence alerts on all hosts
- Topology changes: move everything under db1164
db-switchover --timeout=1 --only-slave-move db1159.eqiad.wmnet db1164.eqiad.wmnet
- Disable puppet @db1159 and puppet @db1164 puppet agent --disable "switchover to db1164"
- Merge gerrit: https://gerrit.wikimedia.org/r/c/operations/puppet/+/827398
- 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 db1159 to db1164 - T316202
root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --skip-slave-move db1159 db1164
- 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 (db1159)
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): db1159 and db1164
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 db1159 to be moved to m3: T316500
- Update/resolve phabricator ticket about failover