Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2015 12:06:53 +0500
From:      "Eugene M. Zheganin" <emz@norma.perm.ru>
To:        freebsd-stable@freebsd.org
Subject:   Re: [POSSIBLE BUG] 10-STABLE CARP erroneously becomes master on boot
Message-ID:  <55D6CE0D.9030806@norma.perm.ru>
In-Reply-To: <CAE63ME5eMhtnoKXqb6H-CfKBXUqBrVvTuFaSgWf6sc-PXLgGXQ@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55D6CE0D.9030806>