Damien Fleuriot
2015-Aug-17 16:22 UTC
[POSSIBLE BUG] 10-STABLE CARP erroneously becomes master on boot
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 Additionally, the sysctls for CARP for both boxes : == BEGIN net.inet.carp.ifdown_demotion_factor: 240 net.inet.carp.senderr_demotion_factor: 240 net.inet.carp.demotion: 0 net.inet.carp.log: 1 net.inet.carp.preempt: 1 net.inet.carp.allow: 1 net.pfsync.carp_demotion_factor: 240 == END The hosts can see each other correctly, as evidenced by manually configuring the CARP aliases on Host B after it boots, and it retaining Backup status. Has anyone experienced the same problem ? I'm thinking of upgrading Host A to 10.2-PRERELEASE so they're on the same revision level, but I'm afraid it may break CARP on boot as on Host B.
Freddie Cash
2015-Aug-17 16:32 UTC
[POSSIBLE BUG] 10-STABLE CARP erroneously becomes master on boot
On Aug 17, 2015 9:22 AM, "Damien Fleuriot" <ml at 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 statebackup),> 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" > > == ENDPut 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)