LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Ldirectord v1.58 does check HTTPS negotiate work ?

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Ldirectord v1.58 does check HTTPS negotiate work ?
From: Malcolm Turnbull <malcolm.turnbull@xxxxxxxxxxxx>
Date: Thu, 26 Sep 2002 16:21:06 +0100

Ldirectord v1.58 does check HTTPS negotiate work ?


HTTPS with checktype = connect is fine
but changing checktype to negotiate removes all the real servers...

I'm not to good with PERL but the function seems to die before even getting to the warn ("Testing.... bit ?

sub check_https
{
        my ($v, $r) = @_;
        require Net::SSLeay;
        $Net::SSLeay::trace = 0;
        my $uri = $$v{request};
        my ($page, $result, %headers);
        eval {
                local $SIG{__WARN__};
                local $SIG{'__DIE__'} = "DEFAULT";
                local $SIG{'ALRM'} = sub { die "Timeout Alarm" };
                alarm $$v{negotiatetimeout};
($page, $result, %headers) = &Net::SSLeay::get_https($$r{server}, $$r{port}, $uri);
                my $recstr = $$r{receive};
                warn("Testing: $$r{server}, $$r{port}, $uri");
                if($result =~ /error/i ||
                                ($recstr =~ /.+/ && !($page =~ /$recstr/))) {
                        die("$result");
                }
        };
        alarm 0; # Cancel the alarm

        if ($@) {
                service_set($v, $r, "down");
                &ld_debug(2, "check_https: $$r{url} is down\n");
                return 0;
        }
        service_set($v, $r, "up");
        &ld_debug(2, "check_https: $$r{url} is up\n");
        return 1;
}


--

Regards,

Malcolm Turnbull

IT Manager
Crocus.co.uk Limited
Nursery Court
London Road
Windlesham
Surrey
GU20 6LQ

01344 629661
07715 770523

http://www.crocus.co.uk/

"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin





<Prev in Thread] Current Thread [Next in Thread>
  • Ldirectord v1.58 does check HTTPS negotiate work ?, Malcolm Turnbull <=