LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] LVS and Vserver - Success with DR

To: vserver@xxxxxxxxxxxxxxxxxxxxxx, lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] LVS and Vserver - Success with DR
From: Christian Balzer <chibi@xxxxxxx>
Date: Thu, 15 Apr 2010 18:11:41 +0900
Hello,

having promised ages ago to try this and never finding anything but
failures when googling for it, here is how I've done it. This is done in
LVS-DR mode, which is the most efficient one but also tends to be the most
tricky one. LVS-TUN and NAT are left as exercises for the reader. ^o^

The basics, though I'm relative sure that any 2.3 Vserver would have
worked:
Kernel  : 2.6.33.2-vs2.3.0.36.30.4
HostOS  : Debian Squeeze (meaning util-vserver 0.30.216-pre2864-1)
GuestOS : Debian Lenny
LVSOS   : Debian Squeeze 

On the LVS server (really a HA cluster, but who's counting) a typical
ldirectord/ipvsadmin config:
---
# Global Directives
checktimeout=10
checkinterval=2
autoreload=yes
#logfile="local0"
quiescent=yes

# Virtual Server for HTTP
virtual=10.10.0.88:80
#        fallback=127.0.0.1:80
        real=10.10.0.32:80 gate
        real=10.10.0.33:80 gate
        service=http
#        request="index.html"
#        receive="Test Page"
#       persistent = 600
        scheduler=sh
        protocol=tcp
        checktype=connect
        emailalertfreq=600
        emailalert=root
---

On the Vserver hosts (just one with 2 guests on would of course work as
well but make a lot less sense ^_^) the typical sysctl modifications to
prevent ARP disasters (would go into /etc/sysctl.d/lvs-dr.conf for example):
---
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.eth1.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2
net.ipv4.conf.eth1.arp_announce = 2
---
And yes, this was on the host. And got exported automagically to the guest.
Not sure if and how namespaces might break this in the future.

Finally in the vserver configs for each of the 2 "real" (ahahahah, lovely
clash of LVS and Vserver terminology) servers an additional interface for
the "virtual" IP of the LVS, in this case:
File                                            Contents
/etc/vservers/guest1/interfaces/1/dev           lo
/etc/vservers/guest1/interfaces/1/ip            10.10.0.88
/etc/vservers/guest1/interfaces/1/prefix        32

That's it. Rather more straightforward and successful than I expected it
to be.

Regards,

Christian
-- 
Christian Balzer        Network/Systems Engineer                
chibi@xxxxxxx           Global OnLine Japan/Fusion Communications
http://www.gol.com/

_______________________________________________
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>
  • [lvs-users] LVS and Vserver - Success with DR, Christian Balzer <=