LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: problem with LVS-DR

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: problem with LVS-DR
From: Todd Lyons <tlyons@xxxxxxxxxx>
Date: Mon, 12 Dec 2005 10:36:03 -0800
Timothy Bushart wanted us to know:

>in sysctl.conf
>
>net.ipv4.ip_forward = 1

Not needed for LVS-DR on the directors.  The packets don't "flow
through" the director, they are rewritten by the director and resent to
the realmachines.

>lvs.cf:
>
>serial_no = 33
>primary = x.x.166.133
>service = lvs
>backup_active = 1
>backup = x.x.166.132
>heartbeat = 1
>heartbeat_port = 539
>keepalive = 6
>deadtime = 18
>network = direct
>debug_level = NONE
>monitor_links = 0
>virtual Squid {
>     active = 1
>     address = x.x.166.181 eth0:1
>     vip_nmask = 255.255.255.0
>     port = 3128
>     persistent = 86400
>     send = "GET / HTTP/1.0rnrn"
>     expect = "HTTP"
>     use_regex = 0
>     load_monitor = none
>     scheduler = wlc
>     protocol = tcp
>     timeout = 6
>     reentry = 15
>     quiesce_server = 1
>     server squid1 {
>         address = x.x.166.179
>         active = 1
>         weight = 1
>     }
>     server squid2 {
>         address = x.x.166.180
>         active = 1
>         weight = 1
>     }
>}
>
>ipvsadm output: (I'm not getting any Route, ActiveConn or InactConn, not
>even 0 for some reason)
>
>
>CURRENT LVS ROUTING TABLE
>IP Virtual Server version 1.2.0 (size=4096)
>Prot LocalAddress:Port Scheduler Flags
>-> RemoteAddress:Port Forward Weight ActiveConn InActConn
>TCP x.x.166.181:3128 wlc persistent 86400000 FFFFFFFF

There are no realservers listed under that service.  It should have
something lke this:

miniip2 root # ipvsadm | head
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  smtp.domain.com:smtp wrr
  -> smtp1.domain.net:smtp        Route   100    222        966       
  -> smtp2.domain.net:smtp        Route   100    216        1011      

You have quiescent set so realservers should be there with weight 0.  In
your paste, there are no realservers listed at all, so I wonder if it's
a config file parsing error.  Your config is nothing like mine, I don't
know if the config format you used works or not.  Others will be more
authoritative of that.

>ifconfig eth0:1 <virtual_ip> netmask 255.255.255.0 broadcast x.x.255.255 up

That's on the real server, right?

>My primary lvs node is barking in /var/log/messages about timing out to my
>real servers, although they are up as I can go directly to them bypassing
>lvs and I get connections. I can ping my VIP, I'm not sure what else to
>check.

Your realserver IP must be pingable from the directors.  Now to figure
out why you cannot ping it.  I don't see enough information to
troubleshoot this yet.

1) DIP and VIP for director.  Show ifconfig.
2) RIP and VIP for each realserver.  Show ifconfig.
3) Explain what you did to handle the arp problem on the real servers.

Note that #3 is probably not what's causing your problem (yet).  You
can't make a plain connection to the real servers, have to fix that
first.
-- 
Regards...              Todd
when you shoot yourself in the foot, just because you are so neurally
broken that the signal takes years to register in your brain, it does
not mean that your foot does not have a hole in it.      --Randy Bush
Linux kernel 2.6.12-12mdksmp   2 users,  load average: 1.12, 1.16, 1.26

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