[nsd-users] make nsdc more reliable for restart

Stuart Henderson stu at spacehopper.org
Fri Aug 10 19:25:05 UTC 2012


On 2012-08-10, Anand Buddhdev <anandb at ripe.net> wrote:
> On 10/08/2012 14:55, Alf Schlichting wrote:
>
> Hi Alf,
>
>> while running nsd as a secondary nameserver with +1000
>> domains we discovered that the default nsdc(8) was
>> not able to reliable restart nsd.
>> Reason I think is that, by using the PID file, it sends
>> it's signal to only 1 of the default 3 processes.
>> Afterwards it only checks against this 1 process while 
>> the other 2 still may be running causing trouble on
>> start up.

I wondered whether there's a particular reason that only the
master is signalled, or is this purely due to lack of a portable
pkill-type program? 

>> The patch below fixes it for us (was tested in a lab
>> environment with 10.000 domains).
>
> The "pkill" command is not available on all systems. Linux distros ship
> with it these days, and MacOS X introduced it with Mountain Lion (10.8),
> but it may not be available on other systems. Therefore your patch is
> not portable.

Some OS have "killall" that does the same as pkill, but other
OS have a different "killall" that behaves slightly differently ;)





More information about the nsd-users mailing list