jmanteau

Mon coin de toile - A piece of Web

UCARP: force master to become slave

Posted: Feb 26, 2013
UCARP: force master to become slave

From UcARP documentation:

You can send the ucarp process a SIGUSR2 to have it demote itself from master to backup, pause 3 seconds, then proceed as usual to listen for other masters and promote itself if necessary. This could be useful if you wish another node to take over master.

So if you want the slave to takeover the master you juste have to do:

pkill -12 ucarp

In case of several VIPs, you have to identify the PID of the ucarp managing the vip:

kill -12 $(ps aux | grep ucarp | grep VIP | awk '{ print $2 }')