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, 6 Jan 2004 11:55:41 -0000
Thanks, that works as expected.

Phil

-----Original Message-----
From: Horms [mailto:horms@xxxxxxxxxxxx] 
Sent: 06 January 2004 08:30
To: LinuxVirtualServer.org users mailing list.
Subject: Re: Ldirectord and real server checking


On Mon, Jan 05, 2004 at 03:37:16PM -0000, Philip Hayward wrote:
> Hi Horms,
> 
> I hope you had a good New Year.
> 
> I was wondering if you'd had time to look into this issue?

Happy New Year to all.

Thanks for reminding me about this, it seems to have fallen off my TODO list
somehow.

It seems that the existing behaviour was designed more with proxies in mind
rather than using an alternate server for checks. Personally I think proxy
support would be better handled in other ways so I have changed the
behaviour to what you expected - what I would have expected to. Obviously
whoever origonally wrote the code (not me) had different ideas. In any case
the patch below, which will appear in CVS shortly, should resolve your
problem.

Index: ldirectord
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/ldirectord/ldirectord,v
retrieving revision 1.62.2.13
diff -u -r1.62.2.13 ldirectord
--- ldirectord  16 Dec 2003 03:52:14 -0000      1.62.2.13
+++ ldirectord  6 Jan 2004 08:26:26 -0000
@@ -209,9 +209,8 @@
 arguments are optional. They define a request-receive pair to be used to
check if a server is alive. They override the request-receive pair in the
virtual server section. These two strings must be quoted. If the request
-string starts with I<http://...> the IP-address of the real server is
-overridden, otherwise the IP-address of the real server is used. This may
-be used to send a request over a transparent proxy.
+string starts with I<http://...> the IP-address and port of the real 
+server is overridden, otherwise the IP-address and port of the real 
+server is used.
 
 =head2 More than one of these entries may be inside a virtual section:
 
@@ -1246,8 +1245,7 @@
                                my $uri = $$r{request};
                                $uri =~ s/^\///g;
                                if ($$r{request} =~ /$$v{service}:\/\//) {
-                                       my $port=(defined
$$v{checkport}?$$v{checkport}:$$r{port});
-                                       $$r{url} =
"$$v{service}:\/\/$$r{server}:$port\/$uri";
+                                       $$r{url} = "$uri";
                                } else {
                                        my $port=(defined
$$v{checkport}?$$v{checkport}:$$r{port});
                                        $$r{url} =
"$$v{service}:\/\/$$r{server}:$port\/$uri";

-- 
Horms
_______________________________________________
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>