Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2015 13:12:53 +0200
From:      Damien Fleuriot <ml@my.gd>
To:        "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: [POSSIBLE BUG] 10-STABLE CARP erroneously becomes master on boot
Message-ID:  <CAE63ME51ZPz7ved9bsMpgAG7_T4khBesabF6zCd3ot2q%2BZ=Dsg@mail.gmail.com>
In-Reply-To: <55D6CE0D.9030806@norma.perm.ru>
References:  <CAE63ME70yRFuTbVQnZ9w%2Byf2dZAQkxsdddUhTsqBtms_F%2BdibA@mail.gmail.com> <CAOjFWZ5YBEpWBUMDgmoPqkyUiuCR7QSaZg-bByizwYimXA4NUA@mail.gmail.com> <CAE63ME5030t%2BfDCLgmiY-qgJc36D%2Byq5nv0U6P4gPjUyW6HShw@mail.gmail.com> <CAE63ME4hLrVGCLwaXd4-44qkVYeQx=f6pkD%2BY78CdH6zt9nDSw@mail.gmail.com> <CAE63ME5tTuQ3tsQrsj86ujchtKk5bQycbaoqXiHjpgYTar2FPw@mail.gmail.com> <CAE63ME5eMhtnoKXqb6H-CfKBXUqBrVvTuFaSgWf6sc-PXLgGXQ@mail.gmail.com> <55D6CE0D.9030806@norma.perm.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21 August 2015 at 09:06, Eugene M. Zheganin <emz@norma.perm.ru> wrote:

> Hi.
>
> On 20.08.2015 14:51, Damien Fleuriot wrote:
> >
> > Hello list,
> >
> >
> >
> > We've managed to find the source of the bug, if it is indeed a bug.
> >
> > It all comes down to the order in which the IP addresses are assigned to
> > the interface from /etc/rc.conf.
> >
> >
> > When using the following syntax, the physical IP address is configured
> > AFTER the CARPs on the interface, which results in the CARP
> advertisements
> > being sourced from the CARP IP, triggering the double MASTER situation :
> > ipv4_addrs_int="1.2.3.4/24"
> > ifconfig_int_alias0="1.2.3.6/32 vhid 1 pass test advskew 20"
> >
> > When using either of the following syntaxes, the physical IP address is
> > configured BEFORE the CARPs, which results in the CARP advertisements
> being
> > sourced from the physical IP and restoring normal functionality :
> > ifconfig_int="inet 1.2.3.4/24"
> > ifconfig_int_alias0="1.2.3.6/32 vhid 1 pass test advskew 20"
> > OR
> > ifconfig_int_alias0="1.2.3.4/24"
> > ifconfig_int_alias1="1.2.3.6/32 vhid 1 pass test advskew 20"
> >
> It has been there since carp-ng was commited to the 10-CURRENT 2 years
> ago. The thing is, carp-ng doesn't need a non-carp address on an
> interface anymore, both nodes can work fine using only shared address.
> This isn't comfortable in lots of cases, but still. Thus, kernel sends
> carp advertisements from a primary address on the interface (which is
> normal behavior for any known network stack) and for FreeBSD that
> primary address has always been the first address on an interface for a
> given AF. Thus, your split-brain carp situation cause lies definitely
> somewhere else. I'm running carp on FreeBSD for years, including legacy
> one; if there is a bug - the situation you are describing probably isn't
> one.
>
>

Eugene, agree to disagree here.


I've also been using CARP for years, both legacy and carp-ng, and while I'm
not an expert on its inner workings I do understand how it operates.

What you describe WRT the network stack and sourcing the advertisements is
correct, I'll give you that.


The problem lies not with CARP but with how the IP addresses are assigned
by rc.conf

It is abnormal that the CARP addresses should be set up first, when using
the "ipv4_addrs_int" syntax.
Therein lies the problem.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE63ME51ZPz7ved9bsMpgAG7_T4khBesabF6zCd3ot2q%2BZ=Dsg>