[Kea-users] How is handled csv lease file clean-up ?

Tomek Mrugalski tomasz at isc.org
Fri Sep 26 16:03:25 UTC 2014


On 26.09.2014 17:35, Chaigneau, Nicolas wrote:
> Is there a mechanism to clean-up old entries in the csv lease file (ie,
> leases renewed, expired or released) ?
> 
We currently have partial expiration support. When we try to allocate a
lease an discover that used to be assigned but is now expired, we reuse
it and assign to a new client. So you will never run out of leases
because the old ones are expired. In that sense, we support lease
expiration.

On the other hand, there is no specific event or code triggered when the
lease expires. So we can't do any actions, like log that a client
stopped using a lease or clean up DDNS, or purse database. In that sense
we don't support lease expiration yet.

> With dhcpd, I believe there is a clean-up mechanism triggered every
> hour, involving a backup of the previous lease file to <lease file>~
> 
> How does Kea handle this ?
It doesn't. It's planned for 0.9.2. See http://kea.isc.org/roadmap or
http://kea.isc.org/milestone/Kea0.9.2. There's a reason why the version
number hasn't reached 1.0 yet.

The exact design is not done yet, but our current plan is to provide a
knob that will specify how often the database should be cleaned of
expired leases. If you just need your DB to be cleaned up, 1 hour seems
reasonable. If you need a log entry or DNS cleanup being done the exact
moment when the expiration happens, set it to 1 second. And if all you
care is performance and don't want any slowdowns, set it to 0, so the
expiration check would happen only during startup and shutdown.

Tomek



More information about the Kea-users mailing list