What version of keepalived are you using? I found this online: https://github.com/acassen/keepalived/issues/8
I would first try removing the check script and validating that failure works without the check script. If that works you might need to update keepalived. Here’s a brief introduction I did a while back on using haproxy with keepalived as a load balancer (FWIW): http://four-eyes.net/2013/01/haproxy-keepalived-the-free-ha-load-balancer/ From: Lei Zhang [mailto:zhang.lei....@gmail.com] Sent: Monday, May 06, 2013 7:55 PM To: Smith, Eric E Cc: openstack@lists.launchpad.net Subject: Re: [Openstack] keepalive can not check the haproxy is down. Thanks Eric, I have solve it after breaking down the group. 1. the different netmask is typo. And it doesn't break the failover. 2. Why the group is unnecessary? When there are the two instances using the same check script , like this case, what's mean after grouping them? On Mon, May 6, 2013 at 6:37 PM, <eric_e_sm...@dell.com<mailto:eric_e_sm...@dell.com>> wrote: I see you have different netmasks for the VIP on node1 vs. node2; I would also try breaking them out of the vrrp_sync_group and validating at least 1 router will fail independently. From: Openstack [mailto:openstack-bounces+eric_e_smith<mailto:openstack-bounces%2Beric_e_smith>=dell....@lists.launchpad.net<mailto:dell....@lists.launchpad.net>] On Behalf Of Lei Zhang Sent: Monday, May 06, 2013 3:07 AM To: openstack@lists.launchpad.net<mailto:openstack@lists.launchpad.net> Subject: [Openstack] keepalive can not check the haproxy is down. Hi Guys, I am trying to use keepalive and haproxy to work together to improve the HA of the openstack. But I meet following unexpected issue. I expect that when the haproxy process is crashed on the MASTER node(checked by chk_haproxy), the second node will take over the VIP. But when I stop the haproxy process, nothing is happened. However, when stop the keepalived service, the VIP is set up on the node2 as expected. So I think the root cause should be the chk_haproxy block. But I have no idea why it doesn't work. Does any body have ideas? node1 keepalived.conf global_defs { lvs_id LVS_228 } vrrp_sync_group openstack_haproxy { group { v1 v2 } } vrrp_script chk_haproxy { script "killall -0 haproxy" interval 2 debug weight 2 } vrrp_instance v1 { interface eth0 debug state MASTER virtual_router_id 1 priority 101 virtual_ipaddress { 192.168.0.230/24<http://192.168.0.230/24> } track_script { chk_haproxy } } vrrp_instance v2 { interface eth1 state MASTER debug virtual_router_id 2 priority 101 virtual_ipaddress { 10.1.0.30/16<http://10.1.0.30/16> } track_script { chk_haproxy } } node2 keepalived.conf global_defs { lvs_id LVS_229 } vrrp_sync_group openstack_haproxy { group { v1 v2 } } vrrp_script chk_haproxy { script "killall -0 haproxy" interval 2 weight 2 } vrrp_instance v1 { interface eth0 state BACKUP virtual_router_id 1 priority 100 virtual_ipaddress { 192.168.0.230 } track_script { chk_haproxy } } vrrp_instance v2 { interface eth1 state BACKUP virtual_router_id 2 priority 100 virtual_ipaddress { 10.1.0.30 } track_script { chk_haproxy } } -- Lei Zhang Blog: http://jeffrey4l.github.com twitter/weibo: @jeffrey4l -- Lei Zhang Blog: http://jeffrey4l.github.io twitter/weibo: @jeffrey4l
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp