On 18/07/2013 09:01, Marek Vavruša wrote:
I think when you run knotd supervised, it might still
be a better
solution to use signals for stopping and wait for the process to
terminate instead of using 'knotc stop'. Even if I end up shifting
things around and not deprecating -w, does this sound reasonable?
Hi Marek,
This is actually okay. I'm fine with just using the supervisor to send
signals. However, since knotc provided the -w option, I thought I would
make use of it. Anyway, now that you want to deprecate it, I will just
go back to using regular supervisor-based signalling :)
Just for the benefit of others who may want to use upstart or similar
things. For the start phase, I use the following post-start snippet:
until $(knotc status &>/dev/null)
do
sleep 1
done
So while knotd is busy loading zones and initialising itself, the start
phase remains active. When knotd has loaded all its zones and starts
listening for DNS requests, the post-start script will exit, and the
supervisor's dependency tracking can correctly infer that knot is
running fully.
Regards,
Anand