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

Lei Zhang zhang.lei.fly at gmail.com
Mon May 6 08:11:48 UTC 2013


Additional:


Distributor ID:    Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:    12.04
Codename:    precise

ii  haproxy                          1.4.18-0ubuntu1.1
   fast and reliable load balancing reverse proxy
ii  keepalived                       1:1.2.2-3ubuntu1
   Failover and monitoring daemon for LVS clusters



On Mon, May 6, 2013 at 4:07 PM, Lei Zhang <zhang.lei.fly at gmail.com> wrote:

> 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.com
twitter/weibo: @jeffrey4l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130506/aeed942a/attachment.html>


More information about the Openstack mailing list