inaccurate counters in kea core caused by reservations and declined leases
related to https://gitlab.isc.org/isc-projects/kea/-/issues/944
there are several problem discovered in #1065 (closed)
-
declined leases are considered 'allocated' and must be added to recount functions on startup, or they will cause negative counters on expire/reclaim
-
reservations must be treated as normal leases and should increment counters as they are decrementing counters on expire or reclaim and can lead to negative counters
functions that need updating are:
allocateReservedLeases6
allocateGlobalReservedLeases6
- extendLease6 should not increment stats:
"assigned-nas"
"assigned-pds"
"cumulative-assigned-nas"
"cumulative-assigned-pds"
"cumulative-assigned-nas"
"cumulative-assigned-pds"
because they have been already updated by previous functions:
allocateUnreservedLeases6
createLease6
reuseExpiredLease
also by functions at previous point (2):
allocateReservedLeases6
allocateGlobalReservedLeases6
this will also mean that all removed leases in extendLease6 must undo the counters already updated in previous functions:
"cumulative-assigned-nas"
"cumulative-assigned-pds"
"cumulative-assigned-nas"
"cumulative-assigned-pds"
Edited by Razvan Becheriu