Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 2015 09:32:23 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        Damien Fleuriot <ml@my.gd>
Cc:        FreeBSD Stable <freebsd-stable@freebsd.org>, Damien Fleuriot <dam@my.gd>
Subject:   Re: [POSSIBLE BUG] 10-STABLE CARP erroneously becomes master on boot
Message-ID:  <CAOjFWZ5YBEpWBUMDgmoPqkyUiuCR7QSaZg-bByizwYimXA4NUA@mail.gmail.com>
In-Reply-To: <CAE63ME70yRFuTbVQnZ9w%2Byf2dZAQkxsdddUhTsqBtms_F%2BdibA@mail.gmail.com>
References:  <CAE63ME70yRFuTbVQnZ9w%2Byf2dZAQkxsdddUhTsqBtms_F%2BdibA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 17, 2015 9:22 AM, "Damien Fleuriot" <ml@my.gd> wrote:
>
> Hello list,
>
>
>
> I'm seeing this very peculiar behaviour between 2 10-STABLE boxes.
>
> Host A is CARP Master with advskew 20 and runs 10.2-BETA1 from 10/07
> Host B is CARP Backup with advskew 150 and runs 10.2-PRERELEASE from 12/08
>
>
> When I configure CARP in rc.conf on host B, it becomes Master on boot, and
> host A remains Master as well.
> When I force a state change on host B (ifconfig vlanx vhid y state
backup),
> it transitions to Backup then again to Master.
>
> When I comment out the CARP configuration in rc.conf , and configure CARP
> manually on host B's interfaces after it boots, it correctly becomes and
> remains Backup.
>
>
>
> Below is the excerpt from rc.conf pertaining to CARP configuration, the
> only difference between the 2 hosts being their advskew.
>
> Host A
> == BEGIN
>
> ifconfig_vlan410_alias0="vhid 110 pass passhere advskew 20 alias
> 10.104.10.251/32"
>
> == END
>
> Host B
> == BEGIN
>
> ifconfig_vlan410_alias0="vhid 110 pass passhere advskew 150 alias
> 10.104.10.251/32"
>
> == END

Put the IP first, and the vhid stuff last in rc.conf for things to work the
most reliably. And drop the extra alias.

ifconfig_vlan410_alias0="inet 10.104.10.251/32 vhid 110 pass passhere
advskew 150"

CARP requires that all IPs on an interface that are part of the same vhid
to be listed (added) in the exact same order for the vhid to be considered
"the same". That one trips me up all the time when manually adding an IP to
a CARP pair, and then later rebooting one box as they both think they're
master for that interface, while being a mix of master/backup for the other
interfaces.

Cheers,
Freddie
(running CARP on 2 10-CURRENT boxes and 2 10.1-p13 boxes)



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