I have a problem with Keepalived.
If my application process goes down due to some reason, keepalived fail over the VIP to backup node. However, if the process fails again on backup node its not relocating to Master node. from /var/log/messages its clear that its registing the fail.
Below are my config files:
On Node1 ( Master)
vrrp_script chk { script "/root/test.sh" interval 2 # check every 2 seconds fall 1 rise 2 weight -60 }
vrrp_instance VRRP1 { state EQUAL priority 110 interface eth0 virtual_router_id 51 advert_int 1 authentication { auth_type PASS auth_pass 1111 }
notify_backup "/etc/keepalived/rtb.sh BACKUP"
notify_fault "/etc/keepalived/rtb.sh FAULT"
virtual_ipaddress {
10.58.127.80/24
}
notify_master "/etc/keepalived/rtb.sh MASTER"
track_script {
chk
}
}
On Node2 (Backup)
vrrp_script chk { script "/root/test.sh" interval 2 # check every 2 seconds fall 1 rise 2 weight -50 }
vrrp_instance VRRP1 { state EQUAL priority 101 interface eth0 virtual_router_id 51 advert_int 1 authentication { auth_type PASS auth_pass 1111 }
notify_backup "/etc/keepalived/rtb.sh BACKUP"
notify_fault "/etc/keepalived/rtb.sh FAULT"
virtual_ipaddress {
10.58.127.80/24
}
notify_master "/etc/keepalived/rtb.sh MASTER"
track_script {
chk
}
}
If I kill my application process on Node1, VIP is getting relocated to Node2. After a while, if I kill my application process again on Node2, it registers that there is failure but NOT relocating the IP.
Dec 11 11:29:50 rtb48 Keepalived_vrrp[25813]: VRRP_Script(chk) failed
No action post that.
Keepalived version : keepalived-1.2.13-5.el6_6.x86_64
Any clue?