Help with keepalived for linode failover

Hello, I made a post a bit ago about getting keepalived working. It's now running, but from the looks of it my linodes (although they can ping eachother and iptables is completely permissive between both of them) are not registering with eachother when keepalived starts up.

Doing a "ip addr sh eth0" shows me that both nodes are grabbing the shared IP, and aren't communicating with eachother.

Reading about keepalived and VRRP have proved futile, so I'm hoping someone on here who has experience with them (or just multicasting in general) can help me out. I don't know how to debug the connection between the two machines, even after reading up on VRRP and multicasting.

I CAN ping and access the shared IP (even though both machines claim it), and it seems to intermittently switch between the two…which I guess would provide some sort of failover, but I want this working right. Any ideas? Here's my config, if it helps.

global_defs {
    notification_email {
         info@dotdotdot.com
    }

    notification_email_from alerts@dotdotdot.com
    smtp_server localhost
    smtp_connect_timeout 30
    router_id  
}

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

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 101 

    advert_int 1
    garp_master_delay 2

    smtp_alert

    authentication {
        auth_type PASS
        auth_pass pwdpwdpwd
    }

    virtual_ipaddress {
        69.164.201.xxx
    }
    track_script {
        chk_haproxy
    }
}

3 Replies

I'm wondering…does this have something to do with my machines being on different segments (if that's the wrong term, sorry):

www1 192.168.135.xxx

www2 192.168.136.xxx

I figured if keepalived isn't working, I'll try spread/wackamole (which I've had success with on test machines locally) but as far as I can tell, same problem: the two servers can't see eachother. I tried configuring spread with a broadcast address (192.168.0.255 and 192.168.255.255) and multicast (255.0.0.1)). Neither works, as confirmed with the 'spuser' utility.

Any ideas? Any help would be greatly appreciated.

Both of those IPs are in the same network (it's 192.168.128.0/17 if my memory is right). Also, broadcast/multicast traffic won't work across the Linode network for various reasons: you'll need to use unicast over it.

Got it…now the obvious question: any idea how to configure spread to communicate via unicast vs broad/multicast? I did try googling but nothing definitive came up (spread's documentation isn't the greatest either).

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct