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}
* sockpuppet
* mwaddlink
Switchover steps:
OLD MASTER: db1159
NEW MASTER: db1164
Check configuration differences between new and old master
[x] `$ pt-config-diff h=db1159.eqiad.wmnet,F=/root/.my.cnf h=db1164.eqiad.wmnet,F=/root/.my.cnf `
[x] Silence alerts on all hosts
[x] Topology changes: move everything under db1164
`db-switchover --timeout=1 --only-slave-move db1159.eqiad.wmnet db1164.eqiad.wmnet`
[x] Disable puppet @db1159 and puppet @db1164
`puppet agent --disable "switchover to db1164"`
[x] Merge gerrit: https://gerrit.wikimedia.org/r/c/operations/puppet/+/827398
[x] Run puppet on dbproxy1013 and dbproxy1015 and check the config
`puppet agent -tv && cat /etc/haproxy/conf.d/db-master.cfg`
[x] Start the failover
`!log Failover m2 from db1159 to db1164 - T316202`
```
root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --skip-slave-move db1159 db1164
```
[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 (db1159)
` 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): db1159 and db1164
` puppet agent --enable && run-puppet-agent`
[x] Check services affected (otrs, debmonitor etc)
[x] Clean orchestrator heartbeat to remove the old masters' one:
** `server_id=171966512`
[] Create floating ticket for db1159 to be moved to m3:
[] Update/resolve phabricator ticket about failover