LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] Invalidate expired persistance templates

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] Invalidate expired persistance templates
From: Roberto Nibali <ratz@xxxxxx>
Date: Fri, 04 Nov 2005 12:00:22 +0100
Hi Horms,

> I notices that if persistance timeout is less than 2 min 
> (the FIN_WAIT timeout) then it will expire before its
> controlled connections. This causes ip_vs_conn_expire to
> set the template's timeout to 2min. Which caues somewhat unexpected
> results if the persistance timeout, like say 10s.

Since I've hardcoded FIN_WAIT to 10*HZ I didn't catch this.

> The patch below is a completely untested first cut at fix,
> it tries to resolve the problem by invalidating expired
> templates. So while they will stick around in the table for
> a bit longer, they won't take effect any more.

This is on top of the following patch, which I have just sent Marcelo,
right?

diff -ur v2.4.32-rc2/linux/net/ipv4/ipvs/ip_vs_core.c
linux/net/ipv4/ipvs/ip_vs_core.c
--- v2.4.32-rc2/linux/net/ipv4/ipvs/ip_vs_core.c        2005-11-03
01:20:02.000000000 +0200
+++ linux/net/ipv4/ipvs/ip_vs_core.c    2005-11-03 01:22:36.347895544 +0200
@@ -1111,11 +1111,10 @@
                if (sysctl_ip_vs_expire_nodest_conn) {
                        /* try to expire the connection immediately */
                        ip_vs_conn_expire_now(cp);
-               } else {
-                       /* don't restart its timer, and silently
-                          drop the packet. */
-                       __ip_vs_conn_put(cp);
                }
+               /* don't restart its timer, and silently
+                  drop the packet. */
+               __ip_vs_conn_put(cp);
                return NF_DROP;
        }

> It does this the samw way that ip_vs_check_template() does,
> and that code has been broken out for ease of reading.
> 
> The patch is against 2.4 git (2.4.32-rc2), but it looks
> like the same fix will work for 2.6.

I'll hit this on Monday. I've told Marcelo to hold on releasing 2.4.32
until I've verified the patch above from Julian. What is the easiest way
to reproduce your setup?

Is this critical for 2.4.32?

Cheers,
Roberto Nibali, ratz
-- 
-------------------------------------------------------------
addr://Kasinostrasse 30, CH-5001 Aarau tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------

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