From owner-freebsd-questions@FreeBSD.ORG Sun Oct 5 09:32:24 2008 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 794A31065688 for ; Sun, 5 Oct 2008 09:32:24 +0000 (UTC) (envelope-from frank.cam@webprophets.net.au) Received: from mail.webprophets.net.au (mail.webprophets.net.au [210.9.174.2]) by mx1.freebsd.org (Postfix) with ESMTP id 055258FC1C for ; Sun, 5 Oct 2008 09:32:24 +0000 (UTC) (envelope-from frank.cam@webprophets.net.au) Received: from localhost (localhost [127.0.0.1]) by mail.webprophets.net.au (Postfix) with ESMTP id 5CC2753D182 for ; Sun, 5 Oct 2008 19:20:51 +1000 (EST) X-Virus-Scanned: amavisd-new at webprophets.net.au Received: from mail.webprophets.net.au ([127.0.0.1]) by localhost (mail.webprophets.net.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eH4Cj9zNgX7A for ; Sun, 5 Oct 2008 19:20:46 +1000 (EST) Received: by mail.webprophets.net.au (Postfix, from userid 65534) id F029F53D184; Sun, 5 Oct 2008 19:20:45 +1000 (EST) Received: from 210.56.85.107 ( [210.56.85.107]) as user frank.cam@mail.webprophets.net.au by webmail.webprophets.net.au with HTTP; Sun, 5 Oct 2008 19:20:45 +1000 Message-ID: <1223198445.48e886ede1ea7@webmail.webprophets.net.au> Date: Sun, 5 Oct 2008 19:20:45 +1000 From: frank.cam@webprophets.net.au To: questions@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 X-Originating-IP: 210.56.85.107 Cc: Subject: CARP issue with 2 Masters X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2008 09:32:24 -0000 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 metric 0 mtu 1500 options=9b ether 00:14:22:20:b0:dc inet 192.168.2.11 netmask 0xfffffff8 broadcast 192.168.2.15 media: Ethernet autoselect (100baseTX ) status: active carp0: flags=49 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 metric 0 mtu 1500 options=9b ether 00:14:22:1d:15:d0 inet 192.168.2.12 netmask 0xfffffff8 broadcast 192.168.2.15 media: Ethernet autoselect (100baseTX ) status: active carp0: flags=49 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