KDC worker processes project

Ken Raeburn raeburn at MIT.EDU
Fri Sep 17 14:34:08 EDT 2010


I find the disabling of automatic handling of network reconfiguration based on platform plus whether you're using worker processes rather unappealing, since conceptually they're not related.

It shouldn't be that tough to do.  I think it's basically in two main pieces:

* Detect the network change in the parent; reconfigure, tell the existing children (via signal, or EOF on an internal pipe) to go away when they finish their current work, and spawn new children.  My guess is this probably belongs in the common network-server driver code, though you might need callbacks to initialize after forking and clean up before exiting (i.e., make the network-server code closer to taking over all of main() with callouts to server-specific code).

* In reconfiguration, don't simply close all sockets and open them all over again with a new, possibly-overlapping set of addresses; if children linger a while, the parent may not be able to reopen some addresses.  Instead, compare the addresses scanned against the already-open sockets; open new sockets only when addresses aren't found, and close sockets if they're no longer in the new address set.  (Of course, if you make it support an empty starting socket list, you can still use this same code at KDC startup.)

The latter leads to cleaner behavior in the one-process case too, since even while dealing with a network configuration change, we wouldn't briefly reject connections/packets on interfaces/addresses that haven't been reconfigured.

Though, it *is* more work than just giving up on automatic reconfiguration support...

Ken





More information about the krbdev mailing list