Re: HELP! Keepalived 1.2.13 VRRP on Amazon EC2 (Non VPC)

Christopher Rose <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <CAP05-v+jN_q91nGQ-HnaXkPx-K3T_YSRswpKJfxm1cAifZoM_A@mail.gmail.com>
I can run tcpdump between both nodes and the following is displayed every
second:

LB1:

10.xx.xx.171 > 10.xx.xx.211: VRRPv2, Advertisement, vrid 51, prio 103,
authtype none, intvl 1s, length 16, addrs:

LB2:

10.xx.xx.211 > 10.xx.xx.171: VRRPv2, Advertisement, vrid 51, prio 103,
authtype none, intvl 1s, length 16, addrs:

This makes me think that unicast is working but yet after a couple of
seconds, LB2 transitions from BACKUP state to MASTER state..


On 1 July 2014 09:42, Alexandre Cassen <[email protected]> wrote:

> Hello,
>
> Run tcpdump and all related first step debugging your side… before… can
> you see vrrp advert both side ? if not then something on the routing path
> is filtering or preventing routings of those adverts.
>
> regs,
> Alexandre
>
>
> On 01 Jul 2014, at 10:16, Christopher Rose <[email protected]>
> wrote:
>
> Hello All,
>
> I have been trying to set up keepalived to monitor two HAproxy instances
> in AWS. The idea is that when one of the keepalive instances detects
> HAproxy is down, it switches the master to the the other instance and when
> it swtiches it uses a notify_master operation to run a VRRP script that
> re-assigns the Amazon EC2 EIP using the installed API tools to.
>
> In theory this should work, especially seeing as the latest version of
> Keepalived supports unicast, which gets around the multicast limitation
> that AWS has.
>
> After following multiple blog posts, i'm unable to get two Amazon Linux
> instances talking over unicast (IP tables are off and security groups are
> wide open through AWS).
>
> It seems that even though they can both communicate to each other, they
> are not seeing the unicast packets being sent/received and they are both
> starting in MASTER state.. (Split Brain?)
>
> At first this was just an idea of mine to try it out but now I am having
> issues i'm determined to get it working..
>
> I have exhausted my google search haha.
>
> Config for LB1 Below (LB2 is identical apart from priortiy, state and
> unicast addresses)
>
> *global_defs {*
>
> *   notification_email {*
>
> *     [email protected] <[email protected]>*
>
> *   }*
>
> *   notification_email_from [email protected] <[email protected]>*
>
> *   smtp_server localhost*
>
> *   smtp_connect_timeout 30*
>
> *   router_id LVS_DEVEL*
>
> *}*
>
>
> *vrrp_script chk_haproxy {*
>
> *       script "killall -0 haproxy"     # cheaper than pidof*
>
> *       interval 2                      # check every 2 seconds*
>
> *       weight 2                      # weight of 2*
>
> *}*
>
>
> *vrrp_instance VI_1 {*
>
> *    interface eth0*
>
> *    state MASTER*
>
> *    vmac_xmit_base*
>
> *    virtual_router_id 51*
>
> *    priority 101*
>
> *    track_script {*
>
> *       chk_haproxy    # +2 if process is present*
>
> *    }*
>
> *    unicast_src_ip 10.xx.xx.171 # IP of this instance*
>
> *    unicast_peer { # Do not use multicast, instead send VRRP*
>
> *      10.xx.xx.211 # IP of LB2*
>
> *    }*
>
> *    notify_master "/etc/keepalived/vrrp.sh"*
>
>
> *}*
>
> Wondered if anyone had any ideas?
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>
> http://p.sf.net/sfu/Bonitasoft_______________________________________________
> Keepalived-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/keepalived-devel
>
>
>

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft

_______________________________________________
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.