Keepalived – How to change master owner when node goes down

high-availabilitykeepalived

Hello I would like to know if there any possibilities with keepalived to : change master owner when node goes down ?

In order to illustrate my question :

[standard behavior]
Keepalived cluster with node 1 (master) and node 2 (slave).
When (master) is going down, (slave) is handly the traffic
When (master) is goind up and (master) is getting back the work to handlying the traffic

[attended behavior]
Keepalived cluster with node1 (origin-master) and node2 (origin-slave).
When (origin-master) is going down, (origin-slave) is handlying the traffic and become (new-master)
When (origin-master) is goind up and (new-slave)

Best Answer

My issue was to use a Master > Slave state.
In order to work as I wanted in [attended behavior] I had to setup Backup > Backup state :

# Node1
vrrp_instance VI_TEST_1 {

  state BACKUP
  priority 150
  nopreempt

# Node2
vrrp_instance VI_TEST_1 {
  state BACKUP
  priority 100
  nopreempt

I hope it will help someone!

Related Topic