now i make a test
en:rhel4+heartbeat2.0.7( ldirectord1.143)
vip=192.168.100.206
realserver=192.168.100.125/126/128 with apache
my tunnel device script like this:
[root@CVS init.d]# vi tunl0
#!/bin/sh
# chkconfig: 2345 70 10
# description: Config tunl port and apply arp patch
VIP=192.168.100.206
. /etc/rc.d/init.d/functions
case "$1" in
start)
echo "Tunl port starting"
ifconfig tunl0 $VIP netmask 255.255.255.255 broadcast $VIP up
echo 1 > /proc/sys/net/ipv4/ip_forward
/bin/echo "1" > /proc/sys/net/ipv4/conf/all/arp_ignore
/bin/echo "2" > /proc/sys/net/ipv4/conf/all/arp_announce
/bin/echo "1" > /proc/sys/net/ipv4/conf/tunl0/arp_ignore
/bin/echo "2" > /proc/sys/net/ipv4/conf/tunl0/arp_announce
/bin/echo "0" > /proc/sys/net/ipv4/conf/tunl0/rp_filter
;;
stop)
echo "Tunl port closing"
ifconfig tunl0 down
echo 1 > /proc/sys/net/ipv4/ip_forward
/bin/echo "1" > /proc/sys/net/ipv4/conf/all/arp_ignore
/bin/echo "2" > /proc/sys/net/ipv4/conf/all/arp_announce
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
now,i run tunl0 stop on 192.168.100.128,on 192.168.100.125/126 run tunl0
up,then i put 192.168.100.206 into the IE browser,and refresh continuity,then
ipvsadm -ln display:
[root@lvstest-120 ~]# ipvsadm -ln
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.100.206:80 wlc
-> 192.168.100.126:80 Tunnel 1 0 14
-> 192.168.100.128:80 Tunnel 1 0 13
-> 192.168.100.125:80 Tunnel 1 0 13
but if i use telnet 192.168.100.206 80 the result is:
[root@lvstest-120 ~]# ipvsadm -ln
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.100.206:80 wlc
-> 192.168.100.126:80 Tunnel 1 1 0
-> 192.168.100.128:80 Tunnel 1 0 39
-> 192.168.100.125:80 Tunnel 1 1 0
wlx
2006-11-14
发件人: Horms
发送时间: 2006-11-14 11:11:46
收件人: LinuxVirtualServer.org users mailing list.
抄送:
主题: Re: Re: lvs/tun+ha+ldirectord help
On Tue, Nov 14, 2006 at 10:27:01AM +0800, wlx wrote:
> thanks your repply!yes,the host still accesable by ldirectord,because
> its network and the service(http or squid)are work.
>
> i hope when a host's tunnel is down,it can be detected by the
> ldirectord,then its weight can change to 0,the new connection will not
> sent to it,and the lvs can keep balance(in present.i found when a
> host's tunnel is stopped,the cluster can't work normally,at this
> time if telnet $vip=192.168.100.203 :80 will answer like this
I don't think that is possible without modifying ldirectord.
The problem is that ldirectord tests the health of the real servers
by connecting to them. And as long as it can connect to them,
it thinks that they are healthy.
To me honest I'm not quite sure what the purpose of the tunnel is
in your setup. Could you elaborate?
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users
|