Re: CARP on -CURRENT

看板FB_current作者時間14年前 (2012/02/04 12:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
On Feb 3, 2012, at 1:02 PM, Freddie Cash wrote: > On Fri, Feb 3, 2012 at 1:35 AM, Andrew Hobbs <andrew.hobbs@ai.net> wrote: >>> On 2 February 2012 04:26, Andrew Hobbs <andrew.hobbs@ai.net> 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= _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1FBAr-6Q (FB_current)
文章代碼(AID): #1FBAr-6Q (FB_current)