Prevent VRRP Master from Becoming Master Again After Failure

keepalivedlinuxvrrp

I have two machines (A and B, A is Master) running VRPP (from keepalived) for a Virtual IP.

How can I prevent A from becoming Master again if it has failed and come back up (for whatever reason)?

I'm doing this so that we have a single fail-over to the second box, and going back to normal would require manual intervention.

Best Answer

According to this relatively old thread on the keepalived developer list, it can be done. You set both servers to be equal priority (or none at all), and do not declare the state for either as MASTER or BACKUP, and instead set the state to EQUAL for both.

EDIT (07-Dec-2017):

It appears that EQUAL is not actually a valid state, despite it appearing to provide the desired effect at the time this answer was posted. Please note the comments below, in particular the link to the current issues list for keepalived provided by @cristi.