Discussion:
[Ultramonkey-users 92] ネットワーク不達時のフェイルオーバーに関しまして
Yuta Kiriyama
2004-11-17 07:19:31 UTC
Permalink
$B$*@$OC$K$J$j$^$9!"6M;3$H?=$7$^$9!#(B

UltraMonkey$B$r%F%9%H$7$F$_$h$&$H(B $B2<5-$N%5%s%W%k%Z!<%8$r;29M$K9=@.$7$F$_$^$7$?!#(B
http://ultramonkey.jp/2.0.1/topologies/hc-ha-lb-eg.html

[$B9=@.(B]
$B!&(BOS
$B!!A4$F(B Red Hat Linux 9
$B!&(BUltra Monkey$B%Q%C%1!<%8(B
$B!!A4$F(B 2.0.1

$B!&<B%5!<%P(B1
$B!!(BHostName :real1
$B!!(BIPAddress:192.168.0.11
$B!&<B%5!<%P(B2
$B!!(BHostName :real2
$B!!(BIPAddress:192.168.0.12
$B!&(BLinuxDirector1(Master)
$B!!(BHostName :lvs1
$B!!(BIPAddress:192.168.0.1
$B!&(BLinuxDirector2(Slave)
$B!!(BHostName :lvs2
$B!!(BIPAddress:192.168.0.2

$B!&2>A[(BIP:192.168.0.10
$B!&%G%U%)%k%H%k!<%H(B:192.168.0.254


[$B<B%5!<%P$NDs6!%5!<%S%9(B]
Apache$B$K$h$k(BHTTP(80)$B$rDs6!$7$F$$$^$9(B


$B$=$N7k2L2<5-$N$h$&$J>uBV$H$J$C$F$*$j$^$9!#(B
$B#1!%%V%i%&%6$+$i2>A[(BIP$B$KBP$7$F%j%/%(%9%H$rAw$k$H!"(B2$B$D$N<B%5!<%P$KIi2YJ,;6$5$l$k(B
$B#2!%(BMaster$B$N(BLinuxDirector$B$N(Bheartbeat$B%5!<%S%9$rDd;_$9$k$H(B
$B!!!!%U%'%$%k%*!<%P!<$,H/@8$7$F(BSlave$B$N(BLinuxDirector$B$,%"%/%F%#%V$H$J$k(B
$B!!!!$=$N7k2L!"(BHTTP$B%5!<%S%9$NDs6!$,7QB3$5$l$k(B
$B#3!%(BMaster$B$N(BLinuxDirector$B$N%M%C%H%o!<%/$***@ZCG$9$k$H%U%'%$%k%*!<%P!<$OH/@8$7$J$$(B
$B!!!!$=$N7k2L!"(BSlave$B$N(BLinuxDirector$B$***@8B8$7$F$$$k$K$b4X$o$i$:(BHTTP$B%5!<%S%9$ODs6!$5$l$J$$(B


$B#1!&#2$K4X$7$F$O4|BTDL$j$NF0:n$r$7$F$$$k$N$G$9$,!"#3$N$h$&$K%M%C%H%o!<%/$,@ZCG(B
$B$5$l$?:]$K$b%U%'%$%k%*!<%P!<$9$k$K$O!"$I$N$h$&$***@_Dj$9$l$P$$$$$N$+$465<xD:$1$?$i$H;W$$!"(B
$B%a!<%k$5$;$FD:$-$^$7$?!#(B






UM$B4XO"$***@_Dj$O2<5-$N$h$&$K$J$C$F$$$^$9!#(B
[ha.cf] (lvs1/lvs2$B6&DL(B)
=================================================================
logfacility local0
keepalive 2
deadtime 10
warntime 10
initdead 10
nice_failback off

serial /dev/ttyS0
mcast eth0 225.0.0.1 694 1 1

node$B!!!!(Blvs1
node$B!!!!(Blvs2

ping 192.168.0.254
=================================================================


[haresources] (lvs1/lvs2$B6&DL(B)
=================================================================
lvs1 IPaddr::192.168.0.10/24/eth0 ldirectord::ldirectord.cf
=================================================================


[authkeys] (lvs1/lvs2$B6&DL(B)
=================================================================
auth 2
2 sha1 test
=================================================================


[ldirectord.cf] (lvs1/lvs2$B6&DL(B)
=================================================================
checktimeout=3
checkinterval=1
autoreload=no
quiescent=yes

virtual=192.168.0.10:80
$B!!!!(Breal=192.168.0.11:80 gate
$B!!!!(Breal=192.168.0.12:80 gate
$B!!!!(Bservice=http
$B!!!!(Brequest="heartbeat.html"
$B!!!!(Breceive="HeartBeat"
$B!!!!(Bscheduler=rr
$B!!!!(Bprotocol=tcp
$B!!!!(Bchecktype=negotiate
=================================================================




Master Linux Director$B$N%M%C%H%o!<%/$***@ZCG(B(# service network stop)$B$7$?:]$N%m%0$O2<5-$NDL$j$G$9!#(B
[Master(lvs1$BB&(B]
======================================================================================================================
Nov 17 15:25:00 lvs1 11$B7n(B 17 15:25:00 network: $B%$%s%?!<%U%'!<%9(B eth0$B$r=*N;Cf(B: succeeded
Nov 17 15:25:01 lvs1 11$B7n(B 17 15:25:01 network: $B%k!<%W%P%C%/%$%s%?!<%U%'!<%9(B $B$r=*N;Cf(B succeeded
Nov 17 15:25:01 lvs1 11$B7n(B 17 15:25:01 sysctl: net.ipv4.ip_forward = 0
Nov 17 15:25:01 lvs1 11$B7n(B 17 15:25:01 network: IPv4$B%Q%1%C%HE>Aw$rL58z2=Cf(B: succeeded
Nov 17 15:25:01 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:01 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:01 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:01 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:01 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:01 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:01 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:01 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
($B0J2<(B 2$BICKh$K(B8$B9TJ,$N(BWARN/ERROR$B$,:FH/(B)
Nov 17 15:25:09 lvs1 heartbeat[8295]: info: Link lvs2:eth0 225.0.0.1 694 1 1 dead.
Nov 17 15:25:09 lvs1 heartbeat[8295]: info: Link lvs2:eth0 225.0.0.1 694 1 1 dead.
Nov 17 15:25:09 lvs1 heartbeat[8295]: WARN: node 192.168.0.254: is dead
Nov 17 15:25:09 lvs1 heartbeat[8295]: WARN: node 192.168.0.254: is dead
Nov 17 15:25:09 lvs1 heartbeat[8703]: debug: notify_world: setting SIGCHLD Handler to SIG_DFL
Nov 17 15:25:09 lvs1 heartbeat[8295]: info: Link 192.168.0.254:192.168.0.254 dead.
Nov 17 15:25:09 lvs1 heartbeat[8295]: info: Link 192.168.0.254:192.168.0.254 dead.
Nov 17 15:25:09 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:09 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:09 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:09 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:09 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:09 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:09 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:09 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:09 lvs1 11$B7n(B 17 15:25:09 heartbeat: info: Running /etc/ha.d/rc.d/status status
Nov 17 15:25:09 lvs1 11$B7n(B 17 15:25:09 heartbeat: info: Running /etc/ha.d/rc.d/status status
Nov 17 15:25:11 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:11 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:11 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:11 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:11 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:11 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:11 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:11 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
($B0J2<(B 2$BICKh$K(B8$B9TJ,$N(BWARN/ERROR$B$,:FH/(B)
($B$3$3$G%M%C%H%o!<%/I|5l(B(# service network start))
Nov 17 15:25:57 lvs1 11$B7n(B 17 15:25:57 sysctl: net.ipv4.ip_forward = 1
Nov 17 15:25:57 lvs1 11$B7n(B 17 15:25:57 sysctl: net.ipv4.conf.default.rp_filter = 1
Nov 17 15:25:57 lvs1 11$B7n(B 17 15:25:57 sysctl: kernel.sysrq = 0
Nov 17 15:25:57 lvs1 11$B7n(B 17 15:25:57 sysctl: kernel.core_uses_pid = 1
Nov 17 15:25:57 lvs1 11$B7n(B 17 15:25:57 network: Setting network parameters: succeeded
Nov 17 15:25:57 lvs1 11$B7n(B 17 15:25:57 network: Bringing up loopback interface: succeeded
Nov 17 15:25:57 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:57 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:57 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:57 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:57 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:57 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:57 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:57 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:59 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:59 lvs1 heartbeat[8291]: WARN: Error sending packet: Invalid argument
Nov 17 15:25:59 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:59 lvs1 heartbeat[8291]: ERROR: write failure on mcast eth0 225.0.0.1 694 1 1.: Invalid argument
Nov 17 15:25:59 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:59 lvs1 heartbeat[8293]: ERROR: Error sending packet: Network is unreachable
Nov 17 15:25:59 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:25:59 lvs1 heartbeat[8293]: ERROR: write failure on ping 192.168.0.254.: Network is unreachable
Nov 17 15:26:00 lvs1 11$B7n(B 17 15:26:00 network: Bringing up interface eth0: succeeded
Nov 17 15:26:01 lvs1 heartbeat[8295]: info: Link 192.168.0.254:192.168.0.254 up.
Nov 17 15:26:01 lvs1 heartbeat[8295]: info: Link 192.168.0.254:192.168.0.254 up.
Nov 17 15:26:01 lvs1 heartbeat[8295]: WARN: Late heartbeat: Node 192.168.0.254: interval 62320 ms
Nov 17 15:26:01 lvs1 heartbeat[8295]: WARN: Late heartbeat: Node 192.168.0.254: interval 62320 ms
Nov 17 15:26:01 lvs1 heartbeat[8295]: info: Status update for node 192.168.0.254: status ping
Nov 17 15:26:01 lvs1 heartbeat[8295]: info: Status update for node 192.168.0.254: status ping
======================================================================================================================


[Slave(lvs2)$BB&(B]
======================================================================================================================
Nov 17 15:25:30 lvs2 heartbeat[7539]: info: Link lvs1:eth0 225.0.0.1 694 1 1 dead.
Nov 17 15:25:30 lvs2 heartbeat[7539]: info: Link lvs1:eth0 225.0.0.1 694 1 1 dead.
Nov 17 15:26:22 lvs2 heartbeat[7539]: info: Link lvs1:eth0 225.0.0.1 694 1 1 up.
Nov 17 15:26:22 lvs2 heartbeat[7539]: info: Link lvs1:eth0 225.0.0.1 694 1 1 up.
======================================================================================================================




$BD9$/$J$C$F$7$^$C$FBgJQ?=$7Lu$"$j$^$;$s!#(B
$B0J>e$h$m$7$/$*4j$$CW$7$^$9!#(B

==========================
$B6M;3(B $BM:Bg(B
***@u-jp.com
==========================
KUROSAWA Takahiro
2004-11-17 09:14:02 UTC
Permalink
$B9u_7$G$9!%(B

On 17 Nov 2004 16:19:31 +0900
Post by Yuta Kiriyama
$B$=$N7k2L2<5-$N$h$&$J>uBV$H$J$C$F$*$j$^$9!#(B
$B#1!%%V%i%&%6$+$i2>A[(BIP$B$KBP$7$F%j%/%(%9%H$rAw$k$H!"(B2$B$D$N<B%5!<%P$KIi2YJ,;6$5$l$k(B
$B#2!%(BMaster$B$N(BLinuxDirector$B$N(Bheartbeat$B%5!<%S%9$rDd;_$9$k$H(B
$B!!!!$=$N7k2L!"(BHTTP$B%5!<%S%9$NDs6!$,7QB3$5$l$k(B
$B%a!<%k$5$;$FD:$-$^$7$?!#(B
ipfail $B$H$$$&(B heartbeat $B$N%W%i%0%$%s$r;H$&$3$H$G!$(B3 $B$N$h$&$JLdBj$r(B
$B2r7h$9$k$3$H$,$G$-$^$9!%(B

ha.cf $B$N(B nice_failback $B$r(B

nice_failback on

$B$HJQ99$7!$$5$i$K0J2<$r(B ha.cf $B$KDI2C$9$l$P$h$m$7$$$+$H;W$$$^$9!%(B

respawn hacluster ipfail

ipfail $B$r;H$&$?$a$K$O$5$i$K(B ping $B$K$h$k;XDj$,I,MW$K$J$j$^$9$,!$(B
$B$9$G$K(B ha.cf $B$G;XDj$5$l$F$$$k$h$&$G$9$M!%(Bping $B$G;XDj$9$k%[%9%H$O(B
$B:G$b6a$$$H$3$m$N%2!<%H%&%'%$$+%9%$%C%A$r;XDj$9$k$HNI$$$H;W$$$^$9!%(B

ipfail $B$K$D$$$F$***@bL@$O!$0J2<$,;29M$K$J$k$+$b$7$l$^$;$s(B:

http://ultramonkey.jp/papers/lvs_tutorial/html/#SECTION00032000000000000000


----
VA Linux Systems $B%8%c%Q%s(B $B5;=QIt(B
$B9u_7(B $B?r9((B <***@valinux.co.jp>
Yuta Kiriyama
2004-11-17 23:46:55 UTC
Permalink
Post by KUROSAWA Takahiro
ipfail $B$H$$$&(B heartbeat $B$N%W%i%0%$%s$r;H$&$3$H$G!$(B3 $B$N$h$&$JLdBj$r(B
$B2r7h$9$k$3$H$,$G$-$^$9!%(B
[ha.cf]$B$r2<5-$N$h$&$K=$@5$9$k$3$H$K$h$C$F!"(B
$BL5;v$K%M%C%H%o!<%/ITC#;~$K%U%'%$%k%*!<%P!<$9$k$3$H$r3NG'$G$-$^$7$?!#(B
======================================================
nice_failback on
respawn hacluster /usr/lib/heartbeat/ipfail
======================================================
Post by KUROSAWA Takahiro
ha.cf $B$N(B nice_failback off$B$r(B
$B!!!!!!!!(B nice_failback on
$B$HJQ99$7!$(B
$B$H$N$4;XE&$r<u$1!"2<5-$N>uBV$G$O(Bipfail$B$,F0:n$7$J$$$3$H$b3NG'$G$-$^$7$?!#(B
======================================================
nice_failback off
respawn hacluster /usr/lib/heartbeat/ipfail
======================================================

$B:#2s$O$42sEzD:$-!"@?$K$"$j$,$H$&$4$6$$$^$7$?!#(B
Active/Standby$B9=@.$G%F%9%H$7$?$$$3$H$O0lDL$j$G$-$^$7$?$N$G!"(B
$B<!$O(BActive/Active$B9=@.$K%A%c%l%s%8$7$?$$$H;W$$$^$9!#(B

==========================
$B6M;3(B $BM:Bg(B
***@u-jp.com
==========================

Loading...