Databases on m5:
```
labsdbaccounts
mailman3
mailman3web
striker
test_labsdbaccounts
toolhub
```
When: 9th March - 14:00 UTC
**Impact: Writes will be disabled for around 1 minute.**
Failover process
OLD MASTER: db1132
NEW MASTER: db1107
[x] Check configuration differences between new and old master
`$ pt-config-diff h=db1107.eqiad.wmnet,F=/root/.my.cnf h=db1132.eqiad.wmnet,F=/root/.my.cnf `
[] Silence alerts on all hosts
[] Topology changes: move everything under db1107
`db-switchover --timeout=15 --only-slave-move db1132.eqiad.wmnet db1107.eqiad.wmnet`
[] Disable puppet db1107 and db1132
`puppet agent --disable "switchover to db1107 T302190 "`
[] Merge gerrit: https://gerrit.wikimedia.org/r/c/operations/puppet/+/768954
[] Run puppet on dbproxy1017 and dbproxy1021 and check the config
`puppet agent -tv && cat /etc/haproxy/conf.d/db-master.cfg`
[] Start the failover: `!log Failover m5 from db1132 to db1107 - T302190 `
[] DB switchover
`root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --read-only-master --skip-slave-move db1132 db1107`
[] Reload haproxies (dbproxy1021 is the active one)
```
dbproxy1017: systemctl reload haproxy && echo "show stat" | socat /run/haproxy/haproxy.sock stdio
dbproxy1021: systemctl reload haproxy && echo "show stat" | socat /run/haproxy/haproxy.sock stdio
```
[] kill connections on the old master (db1132)
` 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):db1107 and db1132
`puppet agent --enable && puppet agent -tv`
[] Check affected services
[] Clean orchestrator heartbeat to remove the old masters' one, otherwise Orchestrator will show lag: `delete from heartbeat where server_id=171970595`
[] Close this ticket and create a ticket to move db1132 somewhere else: