LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: LVS with Ldirectord (UltraMonkey) problems

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: LVS with Ldirectord (UltraMonkey) problems
From: "Craig Ward" <Craig.Ward@xxxxxxxxx>
Date: Tue, 3 Sep 2002 10:19:55 +0100
> This bug manifests in the version of perl that 
> that ships
> with Red Hat 7.2, perl-5.6.0-17, but not with the version on my debian
> box that I origionally developed the code on, perl-5.6.1-7. 

I've just tried it on my debain workstation and it does indeed work without a 
problem, unlike on the server which is RedHat 7.2. I can upgrade perl on the 
redhat boxes to get around the problem, but I'd also like to get the latest 
code from CVS - is it a public server? I tried login 'guest' yesterday but 
couldn't get in.

Many Thanks,
Craig.

-- 
Craig Ward - 3rd Line Technical Support - Frontier Internet Services Limited 
Tel: 029 20 820 051 Fax: 029 20 820 038 http://www.frontier.net.uk
Statements made are at all times subject to Frontier's Terms and
Conditions of Business, which are available upon request. 

> -----Original Message-----
> From: Horms [mailto:horms@xxxxxxxxxxxx]
> Sent: 03 September 2002 09:47
> To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: LVS with Ldirectord (UltraMonkey) problems
> 
> 
> On Fri, Aug 30, 2002 at 09:22:54AM +0200, Martijn Klingens wrote:
> > On Thursday 29 August 2002 18:10, Craig Ward wrote:
> > > That's fixed it for me, but I don't know $tmp_id or 
> $virtual_id actually
> > > is.
> > >
> > > If anyone could enlighten me that'd be great :o)
> > 
> > Not sure what that code does either, but my ldirectord CVS 
> copy does something 
> > slightly different at that point in the code:
> > 
> > ----
> >     # Check each virtual service for the real server and make
> >     # changes as neccessary
> >     foreach $v (@VIRTUAL){
> >             # Use found rather than relying on tmp_id being
> >             # set when we leave the foreach loop. There
> >             # seems to some weirdness in Perl (5.6.0 on Redhat 7.2)
> >             my $found = 0;
> >             my $tmp_id;
> >             my $virtual_id = get_virtual_id_str($v);
> >             foreach $tmp_id (@$virtual) {
> >                     if($virtual_id eq $tmp_id) {
> >                             $found = 1;
> >                             last;
> >                     }
> >             }
> >             if ($found == 1) {
> >                     if ($state=~/up/i) {
> >                             $$r{status}=0;
> >                             _service_up($v, $r);
> >                             &ld_debug(2, "Enabled 
> server=$$r{server}");
> >                     } elsif ($state=~/down/i) {
> >                             $$r{status}=1;
> >                             _service_down($v, $r);
> >                             &ld_debug(2, "Disabled 
> server=$$r{server}");
> >                     }
> >             }
> >     }
> > ----
> > 
> > Not sure if this can be dropped in, it might be dependent 
> on the rest of the 
> > ldirectord script. Maybe you can try the CVS version?
> 
> Sorry for the delay in responding to this thread. I have been 
> on holidays.
> 
> The code that is in CVS for the section above, is slightly 
> different to
> that which Craig Ward was using. The functionality is the 
> same, however
> there apears to be a bug in some versions of perl such that 
> the original
> code did not work.
> 
> The problem is that the iterator $tmp_id gets unset when the foreach
> loop ends by calling last, rather than retaining the most recent value
> set.  Thus I used a separate variable $found to idicate if a match was
> found or not.  This bug manifests in the version of perl that 
> that ships
> with Red Hat 7.2, perl-5.6.0-17, but not with the version on my debian
> box that I origionally developed the code on, perl-5.6.1-7. 
> 
> Craig Wood's patch looks a little broken to me at a glance, so I would
> go for the code out of CVS, as above. This code seems to work for both
> the versions of perl mentioned above, and I assume all other 
> versions as
> well.
> 
> -- 
> 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>