From owner-freebsd-current@FreeBSD.ORG Fri Feb 3 18:02:52 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4254B106566C for ; Fri, 3 Feb 2012 18:02:52 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id E82F38FC15 for ; Fri, 3 Feb 2012 18:02:51 +0000 (UTC) Received: by vcmm1 with SMTP id m1so4343350vcm.13 for ; Fri, 03 Feb 2012 10:02:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=z0qo+V8I8S70NyC4zSsiTVODsTNsD+3thtfEhEWO5NA=; b=QF0eL0VNPTU3iEiLppu9t56zQrUXPGU+kGfQrHkq0yd69zpy0xy9lnMHAxWwyVa6dz vkeTog/8FbSiw87TzIy7nHRyWrbPzqg26oN27ihRAcOYTywjjyrQP6fmMhnr2IpLnVFP uNH8DbrTYRCpf8AK29WhyWHio3kEozsYbte7k= MIME-Version: 1.0 Received: by 10.221.13.196 with SMTP id pn4mr5040732vcb.74.1328292171179; Fri, 03 Feb 2012 10:02:51 -0800 (PST) Received: by 10.220.181.4 with HTTP; Fri, 3 Feb 2012 10:02:51 -0800 (PST) In-Reply-To: References: Date: Fri, 3 Feb 2012 10:02:51 -0800 Message-ID: From: Freddie Cash To: Andrew Hobbs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-current@freebsd.org" Subject: Re: CARP on -CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2012 18:02:52 -0000 On Fri, Feb 3, 2012 at 1:35 AM, Andrew Hobbs wrote: >> On 2 February 2012 04:26, Andrew Hobbs wrote: >> > I much appreciate the responses and I was able to get CARP functioning >> > using the new ifconfig syntax under -CURRENT. Having done that, CARP >> > is now acting as it should, though now I have a new challenge with >> > devd and automatic firing of scripts during CARP failover. It appears >> > that the documented method of doing this at >> > http://www.freebsd.org/doc/handbook/disks-hast.html no longer works >> > with the suggested devd.conf setup; notify 30 { >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" "IFNET"; >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" "carp0"; >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "type" "LINK_UP"; >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0action "/usr/local/sbin/carp-hast-switch ma= ster"; }; >> > >> > notify 30 { >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" "IFNET"; >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" "carp0"; >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "type" "LINK_DOWN"; >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0action "/usr/local/sbin/carp-hast-switch sl= ave"; >> > >> > Is it likely that the triggers associated with CARP for devd have chan= ged due to the recent new CARP overhaul? Does anyone know what the new trig= gers may be? >> > >> >> You will need to change this to something like (as taken from man carp): >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0"CARP"; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" =C2=A0 =C2=A0 =C2=A0= "[0-9]+@"; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "type" =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0"(MASTER|BACKUP)"; >> >> The subsystem now is generated as >> snprintf(subsys, IFNAMSIZ+5, "%u@%s", sc->sc_vhid, sc->sc_carpdev->if_xn= ame); > Thanks for the info. I was able to get the triggers firing from devd. I a= lso noticed that the man page on 'carp' references a "carpcontrol.sh" scrip= t as an action. Has this script been prototyped anywhere yet? Mind posting the devd.conf entries you are using? Maybe submitting a docs PR with them included, to update the HAST page? Thanks. I haven't played with HAST and the new CARP code yet. --=20 Freddie Cash fjwcash@gmail.com