Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
MXS-SPRINT-233, MXS-SPRINT-234
Description
While it's possible to switch to another node as master with galeramon (maintenance mode, play with priority), it would be useful to get the same maxctrl command like with mariadbmon:
maxctrl call command galeramon switchover TheMonitor server1 server2
|
to just work somehow and switch master to the directly specified server. In the meantime it would be great to documented the workarounds.
Perhaps the best workaround right now is to configure the monitor with use_priority=true and manually set server priorities (priority=3 etc). Then, when the primary server needs to be temporarily swapped, set it to maintenance with maxctrl set server MyServer1 maint. The monitor should now select another server as primary, according to the priority order. Once primary can swap back, remove maintenance with maxctrl clear server MyServer1 maint.
Alternatively, with use_priority=true, run two maxctrl alter server MyServer priority NewPriority commands, so that the new primary server has a smaller priority and will be promoted. For example, if starting priorities between server1 and server2 are 1 and 2 (respectively), run:
maxctrl alter server server1 priority 2
maxctrl alter server server2 priority 1
Server2 is then preferred as primary by the monitor.