Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Jul 2010 16:29:25 +0900
From:      "hiroshi@soupacific.com" <hiroshi@soupacific.com>
To:        Mikolaj Golub <to.my.trociny@gmail.com>
Cc:        freebsd-fs@freebsd.org, Pawel Jakub Dawidek <pjd@FreeBSD.org>
Subject:   HAST and CARP
Message-ID:  <4C2C43D5.1080907@soupacific.com>
In-Reply-To: <86zkyxvc4v.fsf@kopusha.home.net>
References:  <4C139F9C.2090305@soupacific.com>	<86iq5oc82y.fsf@kopusha.home.net> <4C14215D.9090304@soupacific.com>	<20100613003635.GA60012@icarus.home.lan>	<20100613074921.GB1320@garage.freebsd.pl>	<4C149A5C.3070401@soupacific.com>	<20100613102401.GE1320@garage.freebsd.pl>	<86eigavzsg.fsf@kopusha.home.net>	<20100614095044.GH1721@garage.freebsd.pl>	<868w6hwt2w.fsf@kopusha.home.net>	<20100614153746.GN1721@garage.freebsd.pl> <86zkyxvc4v.fsf@kopusha.home.net>

next in thread | previous in thread | raw e-mail | index | archive | help
HI folks !

I finished to run HAST with CARP and ifstated.

Question I haove now.

SERVERA is master for CARP and HAST
then boot SERVERB

ServerB is using CARP and ifstated.
First CARP state is INIT then BACKUP
Similar to ucarp's method, vip-down.sh is called.
vip-down.sh calls carp_down.sh

Inside is almost same to ucarp_down.sh except delete ucarp staff.

if I do not put hastctl create xxxx, then hastd refuse connection and 
message says
Split-brain detected secondary !


I put debug call but I can not figure out what kind value is correct.

	} else if (res->hr_secondary_localcnt > res->hr_primary_remotecnt &&
	     res->hr_primary_localcnt > res->hr_secondary_remotecnt) {
		/*
		 * Not good, we have split-brain condition.
		 */
//hiroshi debug
pjdlog_error("secondary_remotecnt %lu, primary_remotecnt %lu", 
res->hr_secondary_remotecnt, res->hr_primary_remotecnt);
pjdlog_error("secondary_localcnt %lu, primary_localcnt %lu", 
res->hr_secondary_localcnt, res->hr_primary_localcnt);
		pjdlog_error("Split-brain detected, exiting.");
		nv_add_string(nvout, "Split-brain condition!", "errmsg");
		free(map);
		map = NULL;
		mapsize = 0;
	} else /* if (res->hr_secondary_localcnt < res->hr_primary_remotecnt ||


hastctl status return perfect as secondary.
Only looks like connection error.

When using ucarp with debug
Booting as secondary

vip-up.sh
then
vip-down.sh

But CARP,
only calls vip-dwon.sh directly.

Once I put hastctl create xxx before hastctl role secondary. Things 
works fine.

Do I need hastctl create xxx or split-brain secondary is wrong?

My complete files are here.

http://www.soupacific.com/VivaFreeBSD_HAST/hastquick.html

Anybody to try HAST with CARP, please try! but any mistake I made, All 
risk is your own please.

My HAST, CARP and ifstated works fine!

Thanks

Hiroshi Katayama
Hiorhis





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C2C43D5.1080907>