Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  5 Oct 2008 19:20:45 +1000
From:      frank.cam@webprophets.net.au
To:        questions@FreeBSD.org
Subject:   CARP issue with 2 Masters
Message-ID:  <1223198445.48e886ede1ea7@webmail.webprophets.net.au>

next in thread | raw e-mail | index | archive | help
Hi

I have CARP running on a master and a slave server and for some unknown reason 
the slave continues to classify itself as a master, even though the advskew is 
higher than on the master. 
It appears that queries sent to the CARP ip address go to the master 50% of the 
time and the slave 50% of the time when both servers are up. This plays havoc 
with my databases as I synchronise them asynchronously.

When I take the carp interface down on the slave using 'ifconfig carp0 down && 
ifconfig carp0 up' it lists it's status as 'backup' for about 10 seconds and 
then goes back to 'master'.


Both servers run identical versions of FreeBSD 7.0 with all the same installed 
ports on identical hardware.

The kernel has the following differences from the standard amd64 kernel:
ident           DBKERNEL
options         SCHED_ULE
device          carp

The standard kernel includes "options  PREEMPTION" which is mentioned as a 
possible problem in the handbook with the slave not relinquishing the ip 
address when the master comes back, but that's not exactly what I'm getting 
here.


Here are the relevant setup details for the boxes.

MASTER
uname -a
FreeBSD dbmaster.xxx.net 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #1: Fri Oct  3 
13:54:35 EST 2008     xxx@dbmaster.xxx.net:/usr/obj/usr/src/sys/DBKERNEL  amd64

/etc/rc.conf
ifconfig_em2="inet 192.168.2.11  netmask 255.255.255.248"
cloned_interfaces="carp0"
ifconfig_carp0="vhid 1 pass mypassword 192.168.2.10/29"

ifconfig
em2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 
1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:14:22:20:b0:dc
        inet 192.168.2.11 netmask 0xfffffff8 broadcast 192.168.2.15
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 192.168.2.10 netmask 0xfffffff8
        carp: MASTER vhid 1 advbase 1 advskew 0


SLAVE
uname -a
FreeBSD dbslave.xxx.net 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #1: Fri Oct  3 
13:54:42 EST 2008     xxx@dbslave.xxx.net:/usr/obj/usr/src/sys/DBKERNEL  amd64

/etc/rc.conf
ifconfig_em2="inet 192.168.2.12  netmask 255.255.255.248"
cloned_interfaces="carp0"
ifconfig_carp0="vhid 1 advskew 200 pass mypassword 192.168.2.10/29"

ifconfig
em2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:14:22:1d:15:d0
        inet 192.168.2.12 netmask 0xfffffff8 broadcast 192.168.2.15
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
carp0: flags=49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500
        inet 192.168.2.10 netmask 0xfffffff8
        carp: MASTER vhid 1 advbase 1 advskew 200

With the advskew on the 'slave', I've tried values of 100, 200, 230, 240 and 
250 with no difference in performance.

I've also tried ifconfig_carp0="vhid 1 advskew 200 pass mypassword backup 
192.168.2.10/29" on the slave but this simply locks it into INIT.


I can't figure out if I missed a step in the documentation, made a silly 
mistake in my setup, or found a bug. Any help would be greatly appreciated.

Thank you




--------------------------------------------------------------------
Come and visit Web Prophets Website at http://www.webprophets.net.au




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