I am trying to setup a simple LVS-nat cluster. To do this I have followed
all of the instructions in the HOWTO including applying the kernel patch and
new version of ipvsadm.
My initial suspicion is that I am unable to ping the VIP from any node
(including from both virtual servers themselves). Am I safe in assuming
that you should be able to ping the VIP?
Also was thinking that `ifconfig` on the VS nodes would have some
mention of the masqueraded IP. But this seems to not be the case.
(See output below.)
Looking in /var/log/messages I see evidence which leads me to think
that pulse is doing the correct things in terms of running `ifconfig`
and `arp` to takeover and advertise the service of the masqueraded IP
address. Refer to the below details section for a cut at the log messages.
Another thing I might have expected was to see a route to the VIP which is
the active LVS server. In my case it doesn't show up at all from
the `route -n` command. (See output below.)
On the real servers I set the default GATEWAY in /etc/sysconfig/network
to be the IP address of the nat_router.
It appears that the Primary and Backup LVS router are behaving correctly
in the sense that at any given time only one is active.
Any suggestions on where to begin diagnosing the problem?
Thanks.
--------------------------------------------------------------------------
Shown below are the details of the setup of an http service.
Using Piranha, I have a resulting /etc/lvs.cf file as follows:
primary = 192.168.1.155
backup_active = 1
backup = 192.168.1.156
nat_router = 192.168.5.254 eth0:1
virtual cluweb1 {
address = 192.168.1.160 eth1:1
active = 1
load_monitor = uptime
server iclu3 {
address = 192.168.5.3
active = 1
weight = 1000
}
server iclu4 {
address = 192.168.5.4
active = 1
weight = 1000
}
scheduler = rr
}
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.5.8 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.1.156 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
192.168.5.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:D0:B7:16:96:FD
inet addr:192.168.5.8 Bcast:192.168.5.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:86340 errors:2 dropped:0 overruns:0 frame:0
TX packets:105030 errors:0 dropped:0 overruns:0 carrier:0
collisions:452 txqueuelen:100
Interrupt:10 Base address:0xdf00
eth1 Link encap:Ethernet HWaddr 00:90:27:EB:56:D3
inet addr:192.168.1.156 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:154213 errors:2 dropped:0 overruns:0 frame:0
TX packets:70461 errors:0 dropped:0 overruns:6 carrier:0
collisions:26 txqueuelen:100
Interrupt:9 Base address:0xdd80
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:475 errors:0 dropped:0 overruns:0 frame:0
TX packets:475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
# cat ip_forward
1
# cat ip_always_defrag
1
Excerpt from /var/log/messages:
Feb 23 17:16:10 iclu8 pulse[14618]: starting pulse as backup
Feb 23 17:16:10 iclu8 pulse: pulse startup succeeded
Feb 23 17:16:15 iclu8 pulse[14618]: partner dead: activating lvs
Feb 23 17:16:10 iclu8 pulse: pulse startup succeeded
Feb 23 17:16:15 iclu8 pulse[14618]: partner dead: activating lvs
Feb 23 17:16:15 iclu8 pulse[14618]: running command "/usr/sbin/lvs" "--nofork"
"-c" "/etc/lvs.cf"
Feb 23 17:16:15 iclu8 lvs: running command "/usr/sbin/ipvsadm" "-C"
Feb 23 17:16:15 iclu8 lvs[14622]: running command "/usr/sbin/ipvsadm" "-A" "-t"
"192.168.1.160:80" "-s" "rr"
Feb 23 17:16:15 iclu8 lvs[14622]: running command "/usr/sbin/nanny" "-c" "-h" "
192.168.5.3" "-p" "80" "-a" "180"
Feb 23 17:16:15 iclu8 lvs[14622]: running command "/usr/sbin/ipvsadm" "-A" "-t"
"192.168.1.160:80" "-s" "rr"
Feb 23 17:16:15 iclu8 lvs[14622]: running command "/usr/sbin/nanny" "-c" "-h" "
192.168.5.3" "-p" "80" "-a" "180"
Feb 23 17:16:15 iclu8 lvs[14622]: create_monitor for cluweb1/iclu3 running as pi
d 14630
Feb 23 17:16:15 iclu8 lvs[14622]: running command "/usr/sbin/nanny" "-c" "-h" "
192.168.5.4" "-p" "80" "-a" "180"
Feb 23 17:16:15 iclu8 lvs[14622]: create_monitor for cluweb1/iclu4 running as pi
d 14631
Feb 23 17:16:15 iclu8 nanny[14630]: starting client_monitor for 192.168.1.160:80
Feb 23 17:16:15 iclu8 pulse[14629]: running command "/sbin/ifconfig" "eth0:1" "
192.168.5.254" "up"
Feb 23 17:16:15 iclu8 pulse[14627]: running command "/usr/bin/send_arp" "-i" "e
th0" "192.168.5.254" "00D0B71696FD"
Feb 23 17:16:15 iclu8 nanny[14630]: making 192.168.5.3:80 available
Feb 23 17:16:15 iclu8 nanny[14630]: running command "/usr/sbin/ipvsadm" "-a" "-
t" "192.168.1.160:80" "-r" "192.168
Feb 23 17:16:15 iclu8 pulse[14633]: running command "/sbin/ifconfig" "eth1:1" "
192.168.1.160" "up"
Feb 23 17:16:15 iclu8 pulse[14628]: running command "/usr/bin/send_arp" "-i" "e
th1" "192.168.1.160" "009027EB56D3"
Feb 23 17:16:15 iclu8 nanny[14631]: starting client_monitor for
192.168.1.160:80 Feb 23 17:16:15 iclu8 pulse[14628]: running
command "/usr/bin/send_arp" "-i" "e
th1" "192.168.1.160" "009027EB56D3"
Feb 23 17:16:15 iclu8 nanny[14631]: starting client_monitor for 192.168.1.160:80
Feb 23 17:16:15 iclu8 nanny[14631]: making 192.168.5.4:80 available
Feb 23 17:16:15 iclu8 nanny[14631]: running command "/usr/sbin/ipvsadm" "-a" "-
t" "192.168.1.160:80" "-r" "192.168
Feb 23 17:16:15 iclu8 nanny[14630]: bad load average returned:
Feb 23 17:16:15 iclu8 nanny[14631]: adjusting weight of 192.168.5.4:80 to 2000
Feb 23 17:16:15 iclu8 nanny[14631]: running command "/usr/sbin/ipvsadm" "-e" "-
t" "192.168.1.160:80" "-r" "192.168
Feb 23 17:16:16 iclu8 pam_rhosts_auth[14645]: allowed to root@xxxxxxxxxxxxxxxx a
s root
Feb 23 17:16:16 iclu8 PAM_pwdb[14645]: (rsh) session opened for user root by (ui
d=0)
Feb 23 17:16:16 iclu8 in.rshd[14645]: root@xxxxxxxxxxxxxxxx as root: cmd='rcp -t
/etc/lvs.cf'
Feb 23 17:16:20 iclu8 pulse[14624]: gratuitous arps finished
Feb 23 17:16:25 iclu8 nanny[14630]: adjusting weight of 192.168.5.3:80 to 2000
Feb 23 17:16:20 iclu8 pulse[14624]: gratuitous arps finished
Feb 23 17:16:25 iclu8 nanny[14630]: adjusting weight of 192.168.5.3:80 to 2000
Feb 23 17:16:25 iclu8 nanny[14630]: running command "/usr/sbin/ipvsadm" "-e" "-
t" "192.168.1.160:80" "-r" "192.168
Feb 23 17:19:32 iclu8 pam_rhosts_auth[14733]: allowed to root@xxxxxxxxxxxxxxxx a
s root Feb 23
17:16:25 iclu8 nanny[14630]: running command
"/usr/sbin/ipvsadm" "-e" "-
t" "192.168.1.160:80" "-r" "192.168
Feb 23 17:19:32 iclu8 pam_rhosts_auth[14733]: allowed to root@xxxxxxxxxxxxxxxx a
s root
Feb 23 17:19:32 iclu8 PAM_pwdb[14733]: (rsh) session opened for user root by (ui
d=0)
Feb 23 17:19:32 iclu8 in.rshd[14733]: root@xxxxxxxxxxxxxxxx as root: cmd='rcp -t
/etc/lvs.cf'
|