From owner-freebsd-stable@freebsd.org Mon Aug 17 17:04:42 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A75479BB364 for ; Mon, 17 Aug 2015 17:04:42 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3808F17AD for ; Mon, 17 Aug 2015 17:04:41 +0000 (UTC) (envelope-from ml@my.gd) Received: by lahi9 with SMTP id i9so82876962lah.2 for ; Mon, 17 Aug 2015 10:04:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=7Kb9SOWcYfe3Ma5/AzVEEPJILs9fmN34jsPBz5iH820=; b=PEQwZJ8U5AMwLMPneRhwbvfvJjVV16wtN1MuHwButYiLMzTnygV7hwduQ1dk6RMgsI U4zUjcbj6nAG4+niI+m3up2wcgRcBSSL7C1SCX2y/ga3Kx5fai068RjIKym7+thzk2a7 8btJ0OCc+BkGmjE1+uaflCj2+bobCamAi2BEzxyFVb3OjiVMhOMQt+OFjNS0hqJnmWsZ 5rSfIXWQyd6HyGsGWVWJy3aDk1kZgN0AXEajkk6U+TwPfI/8PElD1yncBBraB2M637pb iSrhnLbYwFl65XgJIbB3omoOUxMXNFeenfnnPSQcgdqCx5eXlCX9SmPFNesUVzqlXSD9 aRPA== X-Gm-Message-State: ALoCoQlpAoUQPUy9W/tPHga1QQk4kjb7Z7Tmzl+jSica9H/CoFgmx9ZRC00xs4hc/1IWANP+VYPI MIME-Version: 1.0 X-Received: by 10.112.151.178 with SMTP id ur18mr1826093lbb.59.1439829526419; Mon, 17 Aug 2015 09:38:46 -0700 (PDT) Received: by 10.112.60.34 with HTTP; Mon, 17 Aug 2015 09:38:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 17 Aug 2015 18:38:46 +0200 Message-ID: Subject: Re: [POSSIBLE BUG] 10-STABLE CARP erroneously becomes master on boot From: Damien Fleuriot To: Freddie Cash Cc: FreeBSD Stable , Damien Fleuriot Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Aug 2015 17:04:42 -0000 On 17 August 2015 at 18:32, Freddie Cash wrote: > > On Aug 17, 2015 9:22 AM, "Damien Fleuriot" 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) > Cheers Freddie, will try and keep the thread up to date on the results.