LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Clear the connection table immediately

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Clear the connection table immediately
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 8 Jun 2004 19:33:06 +0900
On Mon, Jun 07, 2004 at 10:39:56AM +0900, Shinichi Kido wrote:
> 
> > On Fri, Jun 04, 2004 at 04:28:03AM +0200, Stefan Schlosser wrote:
> > > * Shinichi Kido <shin@xxxxxxxxxxxxxxx> [040603 16:35]:
> > > > 
> > > > My current problem is that I don't know how to reset all the connection
> > > > table (the output list by "ipvsadm -lc" command) immediately without
> > > > waiting for the expire time for all the connection. 
> > > > 
> > > 
> > > you may want to try these patches:
> > > 
> > > http://grmmbl.org/code/ipvs-flushconn.diff
> > > http://grmmbl.org/code/ipvsadm-flushconn.diff
> > > 
> > > 
> > > and use `ipvsadm -F' ...
> > 
> > Another alternative, if you have lvs compiled as a module is
> > to reload it. This will clear everything.
> > 
> > ipvsadm -C
> > # remove the ipvs scheduler and other modules
> > # rmmod ip_vs_wlc
> > # ...
> > rmmod ip_vs 
> > modprobe ip_vs
> > 
> > Then again, Shinichi-san, why do you want to clear the connection table?
> > It might be useful for testing. But I am not sure what it would
> > be useful for in production.
> 
> Thank you for kind and quick reply.
> I tested removing ip_vs modules and it works.
> It may be  helpful in the case I change the the weight setting of
> all the real servers, and reflect it immediately.

Ok, I think I understand.
But it would only make a differnce if you have persistant virtual services.

Is this what you are worried about? If so you really just want to
remove the persistance templates from the connection table.
Not all of the connection entries. I am not aware of a way to do that.
Though perhaps the paches sent in response to your post can either do
this or be modified to do it.

Note that if you remove all the connection entries, by any means,
all existing connections will break.

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