Databases on m3: `phabricator`
When: Tuesday 15th at 08:00 AM UTC
**Impact: Writes will be disabled for around 1 minute.**
Failover process
OLD MASTER: db1107
NEW MASTER: db1183
[x] Check configuration differences between new and old master
`$ pt-config-diff h=db1107.eqiad.wmnet,F=/root/.my.cnf h=db1183.eqiad.wmnet,F=/root/.my.cnf `
[x] Silence alerts on all hosts
[x] Topology changes: move everything under db1183
`db-switchover --timeout=15 --only-slave-move db1107.eqiad.wmnet db1183.eqiad.wmnet`
[x] Disable puppet db1107 and db1183
`puppet agent --disable "switchover to db1107 T301219"`
[x] Merge gerrit: https://gerrit.wikimedia.org/r/c/operations/puppet/+/762146
[x] Run puppet on dbproxy1016 and dbproxy1020 and check the config
`puppet agent -tv && cat /etc/haproxy/conf.d/db-master.cfg`
[] Start the failover: `!log Failover m3 from db1107 to db1183 - T301219`
[] Set phabricator in RO:
```
ssh phab1001
sudo /srv/phab/phabricator/bin/config set cluster.read-only true
# restart database server
sudo /srv/phab/phabricator/bin/config set cluster.read-only false
```
[] DB switchover
`root@cumin1001:~/wmfmariadbpy/wmfmariadbpy# db-switchover --read-only-master --skip-slave-move db1107 db1183 `
[] Reload haproxies (dbproxy1020 is the active one)
```
dbproxy1016: systemctl reload haproxy && echo "show stat" | socat /run/haproxy/haproxy.sock stdio
dbproxy1020: systemctl reload haproxy && echo "show stat" | socat /run/haproxy/haproxy.sock stdio
```
[] kill connections on the old master (db1107)
` 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 db1183
`puppet agent --enable && puppet agent -tv`
[] Check services affected: phabricator
[] Clean orchestrator heartbeat to remove the old masters' one, otherwise Orchestrator will show lag: T301219#7710051
[] Close this ticket and create a ticket to update m5: TO-DO