LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] question about LVS

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] question about LVS
From: Michiel van Es <mve@xxxxxxxxxxxxxxxxx>
Date: Mon, 03 May 2010 14:08:21 +0200
Hello,

I am trying to set up LVS with DR on the following setup:

1 load balancer router: 194.145.200.86 : Ubuntu 9.10

2 servers:
server1: 194.145.200.17 - CentOS 5.4
server2: 194.145.200.171 - CentoS 5.4

1 extra ip used for VIP on the load balancer:
194.145.200.87

I have done the following:

On the loadbalancer:

Configured 2 ip-adresses (also the VIP):

eth0      Link encap:Ethernet  HWaddr 00:16:3e:0c:f6:ce
           inet addr:194.145.200.86  Bcast:194.145.200.255 
Mask:255.255.255.0


eth0:0    Link encap:Ethernet  HWaddr 00:16:3e:0c:f6:ce
           inet addr:194.145.200.87  Bcast:194.145.200.255 
Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:14

/etc/ha.d/ldirectord.cf:
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual=194.145.200.87:25
         fallback=127.0.0.1:25
         real=194.145.200.17:25 gate
         real=194.145.200.171:25 gate
         service=smtp
         scheduler=rr
         protocol=tcp

On the real servers:

configured an lo:0 device:
lo:0      Link encap:Local Loopback
           inet addr:194.145.200.87  Mask:255.255.255.255
           UP LOOPBACK RUNNING  MTU:16436  Metric:1

/etc/sysctl.conf:
net.ipv4.ip_forward = 1
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2


My issue:

I can connect to port 25 on the VIP, but:
-i always connect to server2
-when I take server2 down, I don't get connected to server1 (no route to 
host) when I put server2 back in the pool I still get the no route to 
host message:

michiel@wmichiele:~$ telnet 194.145.200.87 25
Trying 194.145.200.87...
Connected to 194.145.200.87.
Escape character is '^]'.
220 PCIntelligence mailserver 2 - mx2.pcintelligence.nl ESMTP
quit
221 PCIntelligence mailserver 2 - mx2.pcintelligence.nl

stopping qmail on server2:

michiel@wmichiele:~$ telnet 194.145.200.87 25
Trying 194.145.200.87...
telnet: Unable to connect to remote host: No route to host
michiel@wmichiele:~$ telnet 194.145.200.87 25
Trying 194.145.200.87...
telnet: Unable to connect to remote host: No route to host

ldirector.log:

May  3 08:06:01 vps704 ldirectord[8172]: Invoking ldirectord invoked as: 
/usr/sbin/ldirectord start
May  3 08:06:01 vps704 ldirectord[8172]: Starting Linux Director 
v1.186-ha-2.99.3 as daemon
May  3 08:06:01 vps704 ldirectord[8174]: Added virtual server: 
194.145.200.87:25
May  3 08:06:02 vps704 ldirectord[8174]: Added fallback server: 
127.0.0.1:25 (194.145.200.87:25) (Weight set to 1)
May  3 08:06:02 vps704 ldirectord[8174]: Quiescent real server: 
194.145.200.17:25 (194.145.200.87:25) (Weight set to 0)
May  3 08:06:02 vps704 ldirectord[8174]: Quiescent real server: 
194.145.200.171:25 (194.145.200.87:25) (Weight set to 0)
May  3 08:06:02 vps704 ldirectord[8174]: Resetting soft failure count: 
194.145.200.17:25 (tcp:194.145.200.87:25)
May  3 08:06:02 vps704 ldirectord[8174]: Restored real server: 
194.145.200.17:25 (194.145.200.87:25) (Weight set to 1)
May  3 08:06:02 vps704 ldirectord[8174]: Deleted fallback server: 
127.0.0.1:25 (194.145.200.87:25)
May  3 08:06:02 vps704 ldirectord[8174]: Resetting soft failure count: 
194.145.200.171:25 (tcp:194.145.200.87:25)
May  3 08:06:02 vps704 ldirectord[8174]: Restored real server: 
194.145.200.171:25 (194.145.200.87:25) (Weight set to 1)
May  3 08:07:00 vps704 ldirectord[8174]: Quiescent real server: 
194.145.200.171:25 (194.145.200.87:25) (Weight set to 0)



I also tried it with heartbeat but heartbeat never starts ldirectord

My heartbeat config:

/etc/ha.d/ha.cf:
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
keepalive 2
deadtime 10
bcast   eth0
mcast eth0 225.0.0.1 694 1 0
auto_failback off
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
node vps704.directvps.nl

/etc/ha.d/haresources:
vps704.directvps.nl ldirectord::ldirectord.cf LVSSyncDaemonSwap::master 
IPaddr2::194.145.200.87/24/eth0/194.145.200.255

/etc/ha.d/authkeys:
auth 3
3 md5 ******

I see in the logfile

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>