[Linux-HA] ldirectord 1.99 fails to recognize HTTPS server being shut down

Horms horms at verge.net.au
Tue Jul 5 03:03:42 MDT 2005


On Tue, Jul 05, 2005 at 10:39:01AM +0200, Volker Dormeyer wrote:
> On Tue, Jul 05, 2005 at 01:06:09PM +0900,
> Horms <horms at verge.net.au> wrote:
>  > On Tue, Jul 05, 2005 at 12:47:57PM +0900, Horms wrote:
>  > > On Tue, Jul 05, 2005 at 11:14:58AM +0900, Horms wrote:
>  > > > On Mon, Jul 04, 2005 at 11:56:29PM +0200, Volker Dormeyer wrote:
>  > > > > Hi all,
>  > > > > 
>  > > > >  * On Mon, 04 Jul 2005 23:19:23 +0200,
>  > > > >  * Bernhard Erdmann <be at berdmann.de> wrote:
>  > > > > 
>  > > > >  >> Thanks for pointing this out, its clearly broken.
>  > > > >  >> Can you see if the following patch helps your cause?
>  > > > > 
>  > > > >  > Hi, this patch disables every real server, no matter if it's alive or not.
>  > > > > 
>  > > > > I believe this has something to do with the httpmethod patch I sent in
>  > > > > some time ago. Do you use httpmethod=HEAD?
>  > > > > 
>  > > > > If so, this patch might help you:
>  > > > > 
>  > > > > --- ldirectord.orig     2005-03-25 23:49:17.096482151 +0100
>  > > > > +++ ldirectord  2005-03-26 00:02:13.183817291 +0100
>  > > > > @@ -1858,7 +1858,7 @@
>  > > > >                 $port=(defined $$v{checkport}?$$v{checkport}:$$r{port})
>  > > > >         }
>  > > > >         my $virtualhost = (defined $$v{virtualhost} ? $$v{virtualhost} : $host);
>  > > > > -       my ($page, $errors, $cert, $head, $body, $response, $result);
>  > > > > +       my ($page, $errors, $cert, $head, $body, $response);
>  > > > >         my $msg = "$$v{httpmethod}" . " $uri HTTP/1.0" . $CRLF
>  > > > >                 . "Host: " . $virtualhost . $CRLF
>  > > > >                 . "Accept: */*" . $CRLF . $CRLF;
>  > > > > @@ -1879,10 +1879,10 @@
>  > > > >                 ($response, $head) = split /\s?\n/, $head, 2;
>  > > > >                 &ld_debug(2, "Result: $response");
>  > > > >                 my $recstr = $$r{receive};
>  > > > > -               if($result =~ /error/i ||
>  > > > > +               if( !($response =~ /20[0-9]/) ||
>  > > > >                                 ($recstr =~ /.+/ && !($body =~ /$recstr/))) {
>  > > > >                         alarm(0);
>  > > > > -                       die("$result");
>  > > > > +                       die("$response");
>  > > > >                 }
>  > > > >         };
>  > > > > 
>  > > > > It parses the return code. If HTTP return code is 20x (OK) or something
>  > > > > like that, it succeeds. But it fails if you get a redirect return code
>  > > > > (i. e. greater than 300). It works for me.
>  > > > > 
>  > > > > @Horms: Maybe you can remember, some time ago I reported this problem
>  > > > > with the httpmethod patch I sent and the HTTPS check. Maybe the report
>  > > > > was lost within numbers of emails you receive every day. Sure, this
>  > > > > patch is not the best way to do this. That's why I replaced Net::SSLeay
>  > > > > by LWP (shouldn't have a memory leak anymore) in another patch.
>  > > > 
>  > > > Could you please rediff your change against CVS, and send it here
>  > > > again? Appologies, but I am not sure what happened to my last copy. But
>  > > > I am certainly very enthusiastic of anything that leads to not using
>  > > > Net::SSLeay.
>  > > 
>  > > Alan has just announced that he wants last minute changes for 2.0.0 in now.
>  > > With this in mind, I'd like to go with the fix you have above. Bernhard,
>  > > can you test this, I will do the same.
>  > 
>  > Attached is a redifed version of the above, that should apply aggainst
>  > the current CVS. I checked and it seems to work fine for me. 
> 
> Okay, I assume, I don't need to rediff it then.

I'd still like the rediff (or the original for that matter, if it
doesn't requrie to much edititing). I'd like to put your solution 
in post 2.0.0. But I can probably add it to the 1.2 branch earlier,
or at least start testing it.

-- 
Horms



More information about the Linux-HA mailing list