LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Using Pulse pre/post script

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Using Pulse pre/post script
From: "L.S. Keijser" <leon@xxxxxxxx>
Date: Mon, 26 Apr 2010 07:06:06 +0200
On Tue, 2010-04-20 at 17:59 +0200, Antoine Samson wrote:
> Just wonder if anyone would have an idea on this.
> 
> 
> On 12/07/2009 05:01 PM, Antoine Samson wrote:
> > In my current lab setup, LVS routeurs are also real servers (did I tell
> > this is a lab setup? ;-) )
> >
> > Everything works fine and I get my HA services running in round-robin
> > mode on both node.
> >
> > But I'm still having this problem and cannot seem to found any work around:
> >
> > - Node 1 is LVS Master and real server 1
> > - Node 2 is LVS Backup and real server 2
> > - Node 2 has an iptable PREROUTING rule to accept virtual ip connections
> >
> > - If Node 1 fails and Node 2 becomes LVS Master, it will keep handling
> > connections to VIP on itself and not on every real servers (until
> > PREROUTING rules are enabled)
> >
> > So I was thinking that there is maybe a way to run pre/post scripts to
> > LVS events such like flushing some iptables rules.

If you're using heartbeat to provide HA, can't you just add a custom
resource script that will do this for you? So your haresources file
looks something like:

node: IPadd:1.2.3.4 \
      iptables-script \
      ldirectord


Léon


_______________________________________________
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>