First of all, sorry about all the e-mails. You know how it is when
you're hot on the trail of a problem and sometimes you get a little too
excited.
I have narrowed down the problem and I can reproduce it. When I run
ipvsadm to change the weight of a realserver, it complains "Destination
already exists" and does not change the weight. ldirectord initially
sets the realserver weight to 0 and it is never getting set to 1, so
redirection never takes place.
See below...
[root@lb1 ~]# ipvsadm -A -t 192.168.5.100:21 -s rr
[root@lb1 ~]# ipvsadm -a -t 192.168.5.100:21 -r 192.168.10.61 -m -w 0
[root@lb1 ~]# ipvsadm -a -t 192.168.5.100:21 -r 192.168.10.61 -m -w 1
Destination already exists
[root@lb1 ~]# ipvsadm -l
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.5.100:ftp rr
-> 192.168.10.61:ftp Masq 0 0 0
After the commands above, I cannot connect to the virtual FTP server.
Note that the weight is still 0!
But if I delete the realserver and re-add it, as follows, the weight
goes to 1...
[root@lb1 ~]# ipvsadm -d -t 192.168.5.100:21 -r 192.168.10.61
[root@lb1 ~]# ipvsadm -a -t 192.168.5.100:21 -r 192.168.10.61 -m -w 1
[root@lb1 ~]# ipvsadm -l
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.5.100:ftp rr
-> 192.168.10.61:ftp Masq 1 0 0
And guess what?
C:\Documents and Settings\eric>ftp 10.0.0.34
Connected to 10.0.0.34.
220 (vsFTPd 2.0.1)
User (10.0.0.34:(none)): doctor
331 Please specify the password.
Password:
230 Login successful.
ftp>
The root cause is that ipvsadm is misbehaving. Instead of changing the
realserver's weight, it is complaining that the destination exists.
So, I must either convince ipvsadm not to complain when I change the
realserver weight, or I must convince ldirectord to delete and re-add
the realserver instead of trying to change its weight.
Comments will be well appreciated.
--
Eric Robinson
Disclaimer - July 16, 2006
This email and any files transmitted with it are confidential and intended
solely for Joseph Mack NA3T,LinuxVirtualServer.org users mailing list.. If you
are not the named addressee you should not disseminate, distribute, copy or
alter this email. Any views or opinions presented in this email are solely
those of the author and might not represent those of Physician Select
Management (PSM) or Physician's Managed Care (PMC). Warning: Although the
message sender has taken reasonable precautions to ensure no viruses are
present in this email, neither PSM nor PMC can accept responsibility for any
loss or damage arising from the use of this email or attachments.
|