Project review: Parallel KDC

Greg Hudson ghudson at MIT.EDU
Fri Mar 12 14:09:56 EST 2010


I realized that there's a fairly serious complication which I didn't
acknowledge in my design, surrounding the interaction between DB module
initialization and worker processes.

What I have right now is broken, although it happens to work for db2.
I'm initializing the database module in the supervisor, cloning its
state to the workers via fork(), and then using it in the worker
processes.  The db2 back end happens to carry around very little
database state since it re-opens the database for each operation, so it
doesn't mind.

I can see two ways to get this right:

1. Defer DB module initialization until the worker processes start.

2. Do DB module initialization in the supervisor as now, but finalize
the modules prior to forking, and reinitialize them in the workers.

The second option is more complicated, but has the advantage that when
the DB module is mis-configured, you get a more orderly failure--an
error in the supervisor prior to opening up the network ports, rather
than a failure and shutdown in each of the workers afterwards.





More information about the krbdev mailing list