Editing dhcpd.conf without corrupting leases

David W. Hankins David_Hankins at isc.org
Mon Apr 13 23:17:35 UTC 2009

On Mon, Apr 13, 2009 at 11:18:17AM -0500, Sean Kelly wrote:
> My working theory is that the SIGTERM from `/etc/init.d/dhcpd restart` is
> happening in the middle of a lease file append, thus causing it to become a
> corrupt leasefile and then making dhcpd fail on restart. That is the
> easiest explanation I've been able to come up with.

That is basically correct.  It's an extremely narrow window to catch
the server between writes.  I've oft lamented we don't do the lease
write in a single call.

> the file is in a consistent state. I'm also not sure whether OMAPI is the
> right solution, or even supportd/maintained anymore. There is no SIGHUP to
> do a config file reload.

To the best of my knowledge, OMAPI is the current only way to move the
server to a safe shutdown.  We keep meaning to add both proper SIGTERM
("safe shutdown") handling, and a SIGHUP handler, but it has not yet

We maintain OMAPI to the extent that we reasonably can, but it is on a
long term plan for phaseout.

David W. Hankins	"If you don't do it right the first time,
Software Engineer		     you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090413/35161834/attachment.bin>

More information about the dhcp-users mailing list