Re: Split Brain recovery with haproxy/keepalived setup

"T. A. Smooth" <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <CAB9+7yhU-XVwS0Td0+Ch7vST3hgk8cuCGzrhDX=wktTTYVeAkQ@mail.gmail.com>
Another thought, is if the priorities are the same, should it not fall back
to comparing IP addresses?
*ntohl(saddr) > ntohl(VRRP_PKT_SADDR(vrrp)*

I figure it would failover then when it does the compare.
-tp-


On Fri, Dec 27, 2013 at 1:26 AM, T. A. Smooth <[email protected]> wrote:

> Once two keepalived systems enter a split brain state, is it expected
> behavior they can get out of it?
>
> Looking at the code it seems they should be able to once they can see each
> others advertisements again. Even if they match priority it seems they
> check source IP next
> in vrrp.c
>
> vrrp_state_master_rx(vrrp_t * vrrp, char *buf, int buflen)
> {
> ##<snip>##
>  } else if (vrrp->family == AF_INET) {
> * if (hd->priority > vrrp->effective_priority ||*
> *    (hd->priority == vrrp->effective_priority &&*
> *     ntohl(saddr) > ntohl(VRRP_PKT_SADDR(vrrp)))) {*
>  log_message(LOG_INFO, "VRRP_Instance(%s) Received higher prio advert"
>     , vrrp->iname);
>  if (proto == IPPROTO_IPSEC_AH) {
> ah = (ipsec_ah_t *) (buf + sizeof(struct iphdr));
>  log_message(LOG_INFO, "VRRP_Instance(%s) IPSEC-AH : Syncing seq_num"
>       " - Decrement seq"
>     , vrrp->iname);
> vrrp->ipsecah_counter->seq_number = ntohl(ah->seq_number) - 1;
>  vrrp->ipsecah_counter->cycle = 0;
> }
>  vrrp->ms_down_timer = 3 * vrrp->adver_int + VRRP_TIMER_SKEW(vrrp);
> vrrp->wantstate = VRRP_STATE_BACK;
>  vrrp->state = VRRP_STATE_BACK;
> return 1;
>  }
> }
>
> Thoughts? Or is there a different line of code execution if there are two
> Master?
>
> -tp-
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&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.