|
The scheme described above wont work with the way mysqlmonitor currently handles downed servers. When a slave goes down, it will lose the [Slave] status. If it comes back online when the master is down, the slave status is not restored, and failover cannot happen without at least one [Slave]. Even if it could, there would be a race, since the servers would not come online at the exact same moment. What may happen is that one slave comes online first, failover is performed on that one with no regards to the others.
Instead, the following steps are taken:
- 1 master, 3 slaves
- stop maxscale so it does not autorejoin later on
- stop & reset slave on servers 3 & 4
- add data to server 4
- restart maxscale, check that server 3 is rejoined but not server 4
- manually set server 1 to replicate from server 4, creating a relay master
- check that servers 2 & 3 are redirected, making server 1 just a slave
- switchover master to server 1, check that it's the master
|