LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Ldirectord and real server checking

To: "'LinuxVirtualServer.org users mailing list.'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Ldirectord and real server checking
From: Philip Hayward <Philip.Hayward@xxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2003 14:28:10 -0000
Hi Horms,

Thanks for the fix. It's working as expected on our test and live systems
and I'm very happy!

Phil


Hi,

Thanks for reporting this roblem so thouroughly.
It is indeed a bug - possibly recently introduced my myself.
As you can see from the patch below, which is now in CVS, 
the fix is quite simple. 

Basically I have changed ldirectord to regard different weights as making
the real server different.  This eliminates the problem that you raised. But
has the slight down-side taht each real server will be checked once for each
weight it has. This could be better but changing the code to make this
happen is non-trivial so I think that is best to just use the fix below.

-- 
Horms

Index: ldirectord
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord,v
retrieving revision 1.74
diff -u -r1.74 ldirectord
--- ldirectord  2 Oct 2003 08:09:02 -0000       1.74
+++ ldirectord  16 Dec 2003 03:45:36 -0000
@@ -2546,7 +2546,7 @@
 
         $real    = $check . ":" . $v->{"protocol"} . ":" 
                 . $r->{"server"} . ":" . $r->{"port"} . ":" 
-                . $checkport . ":" 
+                . $checkport . ":" . $r->{"weight"} . ":"
                 . quotemeta($request) . ":" . quotemeta($receive);
 }
 
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx Send
requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users
<Prev in Thread] Current Thread [Next in Thread>