LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: rc.lvs Configure scripts and Director Failover

To: "lvs-users@xxxxxxxxxxxxxxxxxxxxxx" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: rc.lvs Configure scripts and Director Failover
From: Joseph Mack <mack.joseph@xxxxxxx>
Date: Fri, 24 May 2002 10:03:31 -0400
> Okay assume the LVS is running having been set up using the rc.lvs_dr from
> one of the directors.
> Now the second director has a different config file as the director IP is
> different.
 
No. There is only one rc.lvs_dr file and it has a list
of the director and realserver names (or IP's depending on
what you've used in the conf file). The rc.lvs file checks the
name/IP of the machine it's running on and then looks up the list
to see whether it should configure itself as a director or
realserver and then does the Right Thing (TM).

> Does this other rc.lvs_rc need to be ran on the realservers when the
> directors failover?
 
No. The realservers have been setup to have a VIP, know what the DIP is,
and to route to a gw. None of these IPs change when a director fails over.
The new director comes up with the same VIP and DIP and the realserver
doesn't see that anything has changed.
 
Well not quite. The DIP will have a new MAC address and for a few seconds
after the changeover, packets sent to the DIP will be using the wrong MAC
address, which comes from the arp table in the realserver. If you don't mind
the pause, then the realserver will figure everything out soon enough. The
usual thing on director failover is for the machine that has just taken over
the VIP and DIP to do an arp broadcast (using sendip, or sendarp, forget which)
which flushes the arp entries for those IPs in machines on that network.
 
The vrrpd for LVS which Alexandre Cassen is writing has a smarter scheme. The 
VIP and DIP
instead of being secondary IPs on an ethernet card and hence using the same MAC
address as the primary IP on the NIC, are given their own MAC address from the
private MAC address range (the MAC equivelent of 192.168.1.0/24), and so when
the VIP/DIP move to a new machine, it comes up with the MAC address it
had on the other machine.
 
> I tried killing the main director, rebooted it, the directors failed over ok
> and the LVS continued to work, but my question is should they have bearing
> in mind the rc.lvs_dr script still active on the realservers was the one
> generated on direcotor1.
 
 yes
 
Joe
-- 
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center, 
mailto:mack.joseph@xxxxxxx ph# 919-541-0007, RTP, NC, USA


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