Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] Patch for ldirectord v1.186-ha

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


ivan at modulix

Apr 7, 2011, 7:37 AM

Post #1 of 4 (538 views)
Permalink
[lvs-users] Patch for ldirectord v1.186-ha

Hi,

When I use ldirector with fork enabled in /etc/ldirectord.conf :
fork=yes

the function check_dns needs to ignore the SIGCHILD otherwise
ldirectord try to spawn a new child infinitely..

There's my patch to make it work :
patch -p1 ldirectord < ignore_sig_child.patch

( ldirectord take from
http://horms.net/projects/ldirectord/download/ldirectord-latest )

Best regards.
--
                                                               Ivan Havlicek
Attachments: ignore_sig_child.patch (0.44 KB)


horms at verge

Apr 7, 2011, 4:59 PM

Post #2 of 4 (516 views)
Permalink
Re: [lvs-users] Patch for ldirectord v1.186-ha [In reply to]

On Thu, Apr 07, 2011 at 04:37:54PM +0200, Ivan Havlicek wrote:
> Hi,
>
> When I use ldirector with fork enabled in /etc/ldirectord.conf :
> fork=yes
>
> the function check_dns needs to ignore the SIGCHILD otherwise
> ldirectord try to spawn a new child infinitely..
>
> There's my patch to make it work :
> patch -p1 ldirectord < ignore_sig_child.patch
>
> ( ldirectord take from
> http://horms.net/projects/ldirectord/download/ldirectord-latest )

Thanks Ivan,

nice catch! I guess we also need this change in all the other
places that we use eval, or specifically in check_http().

> *** ldirectord 2011-04-07 14:22:07.000000000 +0200
> --- ldirectord 2011-04-07 14:21:53.000000000 +0200
> ***************
> *** 3539,3544 ****
> --- 3539,3546 ----
> # which throw a fatal exception if they fail
> # Needless to say, this is completely stupid.
> local $SIG{'__DIE__'} = "DEFAULT";
> + # When fork=yes we need to ignore the child death :
> + local $SIG{'CHLD'} = "IGNORE";
> require Net::DNS;
> }
> $res = new Net::DNS::Resolver;

> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


ivan at modulix

Apr 8, 2011, 3:00 AM

Post #3 of 4 (523 views)
Permalink
Re: [lvs-users] Patch for ldirectord v1.186-ha [In reply to]

2011/4/8 Simon Horman <horms [at] verge>:
>> the function check_dns needs to ignore the SIGCHILD otherwise
>> ldirectord try to spawn a new child infinitely..
>> There's my patch to make it work :
>> patch -p1 ldirectord < ignore_sig_child.patch
>
> nice catch! I guess we also need this change in all the other
> places that we use eval, or specifically in check_http().

Hi,

Not sure it's needed.
For now, I use check_http and check_ldap with success as is.
Perhaps, only check_dns create child process ?!
Sorry, I'm not Perl monger, can't help more...
--
                                                               Ivan

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


horms at verge

Apr 9, 2011, 4:18 PM

Post #4 of 4 (513 views)
Permalink
Re: [lvs-users] Patch for ldirectord v1.186-ha [In reply to]

On Fri, Apr 08, 2011 at 12:00:16PM +0200, Ivan Havlicek wrote:
> 2011/4/8 Simon Horman <horms [at] verge>:
> >> the function check_dns needs to ignore the SIGCHILD otherwise
> >> ldirectord try to spawn a new child infinitely..
> >> There's my patch to make it work :
> >> patch -p1 ldirectord < ignore_sig_child.patch
> >
> > nice catch! I guess we also need this change in all the other
> > places that we use eval, or specifically in check_http().
>
> Hi,
>
> Not sure it's needed.
> For now, I use check_http and check_ldap with success as is.
> Perhaps, only check_dns create child process ?!
> Sorry, I'm not Perl monger, can't help more...

Thanks, I guess there is something extra-special going on
inside Net::DNS.

I have applied your original patch.


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.