[kea-dev] memfile / loading of expired leases on startup

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Thu Sep 15 15:09:36 UTC 2016


Hello,



Following ticket #4294 that you've fixed in 1.1.0-beta (thanks again!), there is another related issue I'd like to discuss.

Upon startup, leases (using memfile) are loaded from disk, even if they are expired.
So if Kea is shut down for maintenance for example, and restarted after all the leases are expired, they are loaded anyway. This entails that the reclaim mechanism will have to catch up, and depending on configuration this can take quite a long time.

This causes two issues:
- Until the reclaim mechanism has finally caught up, the statistics will not be accurate.
- And this is lots of unnecessary work for this mechanism (hence for Kea), that could be avoided.

Proposed evolution: upon startup, when loading leases from disk, check if a given lease is expired. If so... don't load it.

Well, it's probably slightly more complicated than that. With lease affinity, maybe something like:

If <lease expiry> + hold-reclaimed-time > now : then load this lease
If not, then just ignore this lease.



Thoughts ?


Regards,
Nicolas.


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 mailing list