From owner-freebsd-current@FreeBSD.ORG Sat Feb 4 03:41:09 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 4D13F1065676 for ; Sat, 4 Feb 2012 03:41:09 +0000 (UTC) (envelope-from andrew.hobbs@ai.net) Received: from ginga.ai.net (ginga.ai.net [205.134.166.19]) by mx1.freebsd.org (Postfix) with ESMTP id 102678FC08 for ; Sat, 4 Feb 2012 03:41:08 +0000 (UTC) Received: from ginga.ai.net ([205.134.166.19]) by ginga.ai.net ([205.134.166.19]) with mapi; Fri, 3 Feb 2012 22:41:07 -0500 From: Andrew Hobbs To: Freddie Cash Date: Fri, 3 Feb 2012 22:41:06 -0500 Thread-Topic: CARP on -CURRENT Thread-Index: Aczi7tOhG7/uss9TTFq35K+T5VSZnQ== Message-ID: <239A12C9-1416-4BFC-80B5-2CA93B400CCB@ai.net> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Sat, 04 Feb 2012 03:41:09 -0000 On Feb 3, 2012, at 1:02 PM, Freddie Cash wrote: > 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 { >>>> match "system" "IFNET"; >>>> match "subsystem" "carp0"; >>>> match "type" "LINK_UP"; >>>> action "/usr/local/sbin/carp-hast-switch master"; }; >>>>=20 >>>> notify 30 { >>>> match "system" "IFNET"; >>>> match "subsystem" "carp0"; >>>> match "type" "LINK_DOWN"; >>>> action "/usr/local/sbin/carp-hast-switch slave"; >>>>=20 >>>> 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? >>>>=20 >>>=20 >>> You will need to change this to something like (as taken from man carp)= : >>> match "system" "CARP"; >>> match "subsystem" "[0-9]+@"; >>> match "type" "(MASTER|BACKUP)"; >>>=20 >>> The subsystem now is generated as >>> snprintf(subsys, IFNAMSIZ+5, "%u@%s", sc->sc_vhid, sc->sc_carpdev->if_x= name); >=20 >> Thanks for the info. I was able to get the triggers firing from devd. I = also noticed that the man page on 'carp' references a "carpcontrol.sh" scri= pt as an action. Has this script been prototyped anywhere yet? >=20 > Mind posting the devd.conf entries you are using? Maybe submitting a > docs PR with them included, to update the HAST page? >=20 > Thanks. I haven't played with HAST and the new CARP code yet. >=20 > --=20 > Freddie Cash > fjwcash@gmail.com The entirety of the cogent entry in /etc/devd.conf that I am using follows; notify 0 { match "system" "CARP"; match "subsystem" "[0-9]+@"; match "type" "(INIT|MASTER|BACKUP)"; # action "/root/carpcontrol.sh $subsystem $type"; action "/etc/test_carp.sh $subsystem $type"; }; This differs from the example in "man 4 carp" only by one line. I substitut= ed the 'action "/etc/test_carp.sh $subsystem $type";' for the line above it= , as I cannot seem to locate a 'carpcontrol.sh' script anywhere on my 10.0-= CURRENT test platform. Hence my earlier inquiry as to if it had been protot= yped anywhere yet. I did locate several CARP related action scripts in /usr= /share/examples/hast/ but I'm not sure how they different from this ephemer= al 'carpcontrol.sh' script without seeing it. -Andrew=