"""
The lease file is a log-structured file - whenever a lease changes, the contents of that lease are written to the end of the file.
"""
"""
In order to prevent the lease database from growing without bound, the file is rewritten from time to time. First, a temporary lease database is created and all known leases are dumped to it. Then, the old lease database is renamed DBDIR/dhcpd.leases~. Finally, the newly written lease database is moved into place.
"""
So this tells me that either dhclient is buggy or (probably more likely) we have other code editing the leases file. I know we did some lease file editing on the dnsmasq side, however I'm not aware of any editing on the dhcp client side. Do you know any code doing that?
Reading ISC dhclient docs I found suggestive language (though no clear claim) that the leases file can be written by multiple dhclients:
https:/ /kb.isc. org/docs/ isc-dhcp- 44-manual- pages-dhcpdleas es
"""
The lease file is a log-structured file - whenever a lease changes, the contents of that lease are written to the end of the file.
"""
""" leases~ . Finally, the newly written lease database is moved into place.
In order to prevent the lease database from growing without bound, the file is rewritten from time to time. First, a temporary lease database is created and all known leases are dumped to it. Then, the old lease database is renamed DBDIR/dhcpd.
"""
So this tells me that either dhclient is buggy or (probably more likely) we have other code editing the leases file. I know we did some lease file editing on the dnsmasq side, however I'm not aware of any editing on the dhcp client side. Do you know any code doing that?