[kea-dev] Suggestion for new hooks: server startup, shutdown, reload
nicolas.chaigneau at capgemini.com
Wed Nov 19 16:04:56 UTC 2014
The hook mechanism provided within Kea looks very handy.
I think it could be extended with new hook points. What do you think of the following proposal ?
- "server startup" hook:
Triggered after server has been started, configuration read, subnets initialized, leases loaded from backend; and just before the server actually starts processing DHCP packets.
This would allow a hook library to:
- Read its configuration (if it has one)
- Perform the initialization steps it requires
- If something wrong happens it could report through an output error code, which would cause the server to stop (as when the main configuration is incorrect, for instance).
The hook should provide access to anything the hook library needs.
For my needs, I can think of the subnets collection and the leases collection. The list is open though.
- "server shutdown" hook:
Triggered just before the server is about to be shut down.
This would give a hook library a chance to perform some termination steps, if need be. Close handles, etc.
(although on Linux it's not strictly needed, it's still cleaner to do so).
- "library reload" hook:
Triggered after the hook library is reloaded (after the server has processed the "libreload" command)
I think the same possibilities as in "server startup" should be provided.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
More information about the kea-dev