Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the proper way to add IP addresses to a keepalived vrrp_instance without have the IPs flop around or drop for a second?

share|improve this question
add comment

1 Answer

This may not be the answer you want to hear as it's a bit of a fudge I think, but I wanted to share an idea with you (as I don't believe there is any supported way of doing this, i.e. having a running keepalived process reload it's config).

You could manually add the IP's to the keepalived interface on the VRRP master using CLI, so assume server1 eth1 is 192.168.0.1 and server2 eth1 is 192.168.0.2, and they both have 192.168.0.254 in keepalived. On server1;

sudo ip a a 192.168.0.253/24 dev eth1

The master now has the additional IP(s).

On server2, make the changes to keepalived config, add in the new IPs, add them under virtual_ipaddress_excluded, as per this SF query.

Now bounce keepalived process on server2, the backup server.

Now add the IP(s) into server1 keepalived confif but don't bounce the daemon, as that will cause downtime. If/when the day comes your master keepalived box enters the fail over state and the server2 becomes master, bounce keepalived on server1 then to reload the config (assuming you're not using preempt, server1 will now wait to become master again, and both boxes have the new IP(s) configured).

That is the only way I can see to do this. I'd like to hear a method for making a running keepalived reload it's config if anyone has such a method.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.