On Mon, Dec 15, 2003 at 03:33:13PM -0000, Philip Hayward wrote:
> Hi Horms,
>
> I followed your suggestion and dropped the latest versions of ldirectord
> from CVS into /usr/sbin on an existing test ultramonkey (RH8
> 2.4.20-20.8.um.1) in the office. I tried 1.74, 1.62.2.12 and 1.62.2.11.
>
> I added some weights to some existing virtual groups, restarted ldirectord,
> and nothing happened. Basically it seems to be ignoring weights. I didn't
> have that problem on 1.62.2.11 on our production system so I'm not really
> sure what's happening. No errors were logged and nothing looked odd when run
> in debug.
>
> Ldirectord.cf:
>
> virtual=10.1.1.83:0
> real=stg-web1:0 masq 1
> real=stg-web2:0 masq 3
> service=http
> scheduler=wlc
> request="TestServlet?size=512"
> receive="successfully"
> checkport=8080
> checktype=negotiate
> persistent=500
>
> virtual=10.1.1.61:0
> real=stg-web1:0 masq 3
> real=stg-web2:0 masq 1
> service=http
> scheduler=wlc
> request="TestServlet?size=512"
> receive="successfully"
> checkport=8080
> checktype=negotiate
> persistent=500
>
> TCP 10.1.1.61:0 wlc persistent 500
> -> stg-web2:0 Masq 1 0 0
> -> stg-web1:0 Masq 1 0 1
> TCP 10.1.1.83:0 wlc persistent 500
> -> stg-web2:0 Masq 1 0 0
> -> stg-web1:0 Masq 1 0 0
>
> I'm afraid I'm not really up to speed with Perl and so can't really see
> whats going on. If anyone has any ideas they would certainly be appreciated!
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);
}
|