Keepalived track_script and failover

Sheldon Lee-Wen <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <103EEAB24688A147B5B2E39C44C71BF05009C215@EX2010-MAIL2.jsitelecom.com>
Hello,

Please forgive me if this is a dumb question, but being new to keepalived I need some help. If this is not the correct place to ask, please let me know where I should go for help.

I have keepalived setup between two servers that run haproxy. When haproxy stops running on one host, the  track_script fails (as it shows in the log) but keepalived does not fail the virtual IP addresses over to the other host. My expectation was that it would failover to the other host. What am I missing?

Here are the config files for both keepalived hosts:

Host1:

global_defs {
    notification_email {
        <removed>
    }
    notification_email_from <removed>
    smtp_server <removed>
    smtp_connect_timeout 30
}

vrrp_script chk_haproxy {
    script "killall -0 haproxy"
    interval 1
    weight 2
}

vrrp_instance VI_1 {
    interface eth0
    state MASTER
    virtual_router_id 51
    priority 150

    smtp_alert

    authentication {
       auth_type PASS
       auth_pass 1234qwer
    }

    virtual_ipaddress {
        192.168.12.5
        192.168.12.10
    }

    track_script {
       chk_haproxy
    }
}

Host2:
global_defs {
    notification_email {
        <removed>
    }
    notification_email_from <removed>
    smtp_server <removed>
    smtp_connect_timeout 30
}

vrrp_script chk_haproxy {
    script "killall -0 haproxy"
    interval 1
    weight 2
}

vrrp_instance VI_1 {
    interface eth0
    state MASTER
    virtual_router_id 51
    priority 100

    smtp_alert

    authentication {
       auth_type PASS
       auth_pass 1234qwer
    }

    virtual_ipaddress {
        192.168.12.5
        192.168.12.10
    }

    track_script {
       chk_haproxy
    }
}

Thank you in advance!

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.