LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

patch for nasty ldirectord bug

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: patch for nasty ldirectord bug
Cc: horms@xxxxxxxxxxxx
From: "Branko F. Gračnar" <bfg@xxxxxxxxxxxx>
Date: Thu, 26 Jan 2006 16:21:43 +0100
Hellow ;)

I found a nasty bug in ldirectord code, which led our lvs setup to work 
improperly - some http "real" servers were not checked becouse of "check 
caching" feature in ldirectord.

I think, that this is a critical bug, which should be fixed immediately.

This bug shows up in the following scenario in ldirector.cf:


--- snip ---
virtual=T.Z.U.P:80
        real=a.b.c.d:80 masq 1
        real=e.f.g.h:80 masq 1
        service=http
        virtualhost="www.domain1.tld"
        request="/testme.php?q=test"
        receive="success string"
        scheduler=lc
        persistent=600
        protocol=tcp
        checktype=negotiate

virtual=T.Z.U.A:80
        real=a.b.c.d:80 masq
        real=e.f.g.h:80 masq
        service=http
        virtualhost="www.domain2.tld"
        request="/testme.php?q=test"
        receive="success string"
        scheduler=lc
        persistent=600
        protocol=tcp
        checktype=negotiate

virtual=T.Z.U.S:80
        real=a.b.c.d:80 masq
        real=e.f.g.h:80 masq
        service=http
        virtualhost="www.domain3.tld"
        request="/testme.php?q=test"
        receive="success string"
        scheduler=lc
        persistent=600
        protocol=tcp
        checktype=negotiate

virtual=T.Z.U.D:80
        real=a.b.c.d:80 masq
        real=e.f.g.h:80 masq
        service=http
        virtualhost="www.domain4.tld"
        request="/testme.php?q=test"
        receive="success string"
        scheduler=lc
        persistent=600
        protocol=tcp
        checktype=negotiate
--- snip ---

How to reproduce:

Well, the bug shows up, when some real servers serve several different 
virtualhosts (in case of http lvs), and LVS virtual servers are configured 
almost identically.

Ofcourse, this bug would not trigger if each and every lvs virtual server 
would have different "request" parameter.

Impact: all real servers are added to lvs virtual servers, but not all are 
actually checked for proper operation (Already checked: real server= debug3 
message).

Patch:
Trivial patch is attached.

Tested versions: 1.77.2.1 2004/04/20 05:05:29, 1.129 2006/01/15 16:25:19

Best regards, Brane




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