[bind10-dev] Shutting down a BIND 10 process

Shane Kerr shane at isc.org
Fri Apr 23 10:46:09 UTC 2010


Hello,

Jeremy found a problem with how xfrout shuts down. There was come
discussion on ticket #134, including a proposed patch:

https://bind10.isc.org/ticket/134

I think we have actually discovered a question with the server
operation, which I wrote up in the ticket but will reproduce it here
(slightly edited because Likun just explained that the xfrout actually
will shut down right away).

-------------------------------------------------------------------------
The question is: What does the administrator want to do on shutdown?

     1. Wait until all in-progress operations are done, then shut down?
     2. Shut down right away?

Sometimes you want to wait until everything is done, then exit.
Sometimes you want to stop RIGHT AWAY.


Also note that when you say "wait", what you actually mean is "wait for
a while". Sometimes this is a couple seconds (when you are rebooting the
box perhaps), sometimes this several minutes (like when you are stopping
the process by hand), sometimes this is hours (like if a really long XFR
is going out).

So, I propose that we need to change the behavior to implement two
different shutdown styles from the point of view of xfrout:

     1. Begin shutdown
     2. Shut down right away

In the first case, we would wait until all transfers are done then exit.
In the second case, xfrout can just call sys.exit() and let the OS clean
everything up.

What the administrator probably wants from either using ctrl-C or
"killall bind10" is:

      * Tell me that shutdown has started
      * If you are waiting on something, tell me how many are left and
        update me as they exit
      * Let me hit ctrl-C or send SIGTERM again to stop right away (tell
        me I can do this, too)

If the administrator is using bindctl, we probably want something like:

      * Give me two options "shutdown" and "force-shutdown" - the second
        stops right away
      * If I do "shutdown", keep me informed of the status of the
        shutdown

This may seem a bit complicated, but I think it is probably the right
answer.
------------------------------------------------------------------------

Anyway, please let me know what you think about server shutdown....

--
Shane




More information about the bind10-dev mailing list