[bind10-dev] Boss stopping msgq enhancements (#2249)

Michal 'vorner' Vaner michal.vaner at nic.cz
Tue Oct 9 17:45:40 UTC 2012


Hello

While I still believe it is a problem that xfrin did stay up so long, I
promised I'd send an email about the ways I see for #2249. So here they are.

Hiding the problem under the rug
================================

Increase the time before sending SIGTERMs to stuff. This'll give xfrin more time
to terminate. Provided there's no bug causing it not to terminate at all, which
I'm afraid might be the case and we should solve that too (but that's a
different problem).

The ugly and fast way
=====================

We add a special case for msgq. Don't consider msgq as one of the components in
the list when shutting down. Just wait for everything to shut down first (with
or without SIGTERMs and SIGKILLs), then send the TERM to msgq. This is not
systematic, because then we'll discover the auth must not stop before xfrout
because of dependency and memory manager must not stop before auth and we have
the problem again. But it is easy to do ‒ not counting the tests, it might be 10
more lines in the boss code. However, we all hate exceptions in our frameworks,
don't we?

Semi-manual way
===============

The component framework allows to specify a priority with each component, which
is used to order the startup. It is not used for shutdown, though. And it would
be mostly useless anyway, because we don't wait for one component to stop before
asking the next one (or to start, so it is mostly useless now anyway).

We could make sure the shutdown „plan of action“ is ordered by the priority too.
And we could update the boss to wait for one component to terminate first
(SIGTERMing or SIGKILLing only the one component if it doesn't want to) before
moving to the next one.

This would effectively make the order of shutdowns as we want it (and with some
small updates, the order of startups too). But it has two disadvantages:
 • Slower shutdown (currently, all the components are shutting down in parallel,
   this would change it to sequential).
 • The stuff here is already somewhat complicated.

Dependency tracking
===================

If we lived in a perfect world, we would implement this. Each component would
know a list of other components it needs. When all the dependencies are started,
it can start. The admin could enable one component and all the ones it depends
on would get started automatically. When shutting down, it would start with the
ones nothing depends on and continue this way.

However, it seems to be the most advanced one too. It would need more or less a
complete overhaul of boss.


So, which one do we want to do?

-- 
How many Lisp programmers does it take to change a light bulb?
(((H)mmm,) (I'm ((not) sure, better))) (find (out))...

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20121009/3e569aae/attachment.bin>


More information about the bind10-dev mailing list