[Openstack] keepalive can not check the haproxy is down.

Lei Zhang zhang.lei.fly at gmail.com
Wed May 8 03:09:51 UTC 2013


I am using the default version of the ubuntu 12.04 ( keepalived
1:1.2.2-3ubuntu1).
Maybe this issue is the root cause. I will try the latest keepalived.


On Tue, May 7, 2013 at 6:11 PM, <Eric_E_Smith at dell.com> wrote:

> 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.fly at gmail.com]
> *Sent:* Monday, May 06, 2013 7:55 PM
> *To:* Smith, Eric E
> *Cc:* openstack at 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_Smith at 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=
> dell.com at lists.launchpad.net] *On Behalf Of *Lei Zhang
> *Sent:* Monday, May 06, 2013 3:07 AM
> *To:* openstack at 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****
>
>     }    ****
>
>     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****
>
>     }    ****
>
>     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****
>



-- 
Lei Zhang

Blog: http://jeffrey4l.github.io
twitter/weibo: @jeffrey4l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130508/0a83813c/attachment.html>


More information about the Openstack mailing list