wiki:LeaseExpirationRequirements

Requirements for Lease Expiration in Kea 1.0

Introduction

"Lease Expiration" is a feature planned for Kea 1.0 release. Current implementation (0.9.2-beta) doesn't perform any specific action for the lease which has expired. However, it is able to reuse an expired lease when the new lease is to be allocated to the same or another client. This document presents the requirements for extending Kea to perform periodic checks for the expired leases and specific actions on each of them (lease reclaimation), such as: lease removal, DNS update (removal) or hooks execution.

Terminology

This document uses the following terminology:

  • Lease reclaimation: The process of restoring an expired lease to a state where it is free to be assigned to a client".
  • Reclaimed lease: A lease for which lease reclaimation is being performed.

Requirements

General

  • G1. MUST be supported by the DHCPv4 server
  • G2. MUST be supported by the DHCPv6 server
  • G3. MUST execute lease-expiration hook for each reclaimed lease
  • G4. MUST notify DNS of the expiration of the reclaimed lease, if DNS updates are enabled
  • G5. MUST render the reclaimed lease free for assignment
  • G6. MUST perform lease reclaimation upon an expired lease before reusing it
  • G7. MUST perform lease reclaimation upon an expired lease before deleting it from the lease database
  • G8. SHOULD process expired leases using the order from those having the earliest expiration time to having the latest expiration time

Data integrity

  • D1. SHOULD guarantee data integrity in case of a power failure or other unexpected interruption
  • D2. MUST resume processing expired leases which haven't been processed because of the power failure or other interruption

Configuration

  • C1. MUST provide a configuration switch to disable lease expiration. It MAY be combined with the switch controlling the period between two consecutive processing cycles
  • C2. MUST provide a configuration parameter to control the length of the period between two consecutive processing cycles
  • C3. MUST provide a configuration parameter to control the maximum number of leases to be processed in a single cycle
  • C4. MUST provide a configuration parameter to control the maximum time that the single leases reclaimation cycle may take
  • C5. MUST provide a configuration parameter to control the number of consecutive reclaimation cycles, after which the server issues the warning if there are still expired leases
  • C6. SHOULD provide means to manually trigger leases reclaimation

Logging and statistics

  • L1. MUST provide the traces informing about the execution time of a single processing cycle
  • L2. MUST provide the traces informing about the number of expired leases processed in a single processing cycle
  • L3. MUST issue a warning message if the server was unable to reclaim all leases in N consecutive cycles
  • L4. MUST use Kea statistics mechanism to record the number of expired leases processed
  • L5. MUST decrease "subnet[id].assigned-addresses" statistic when reclaiming an expired lease.

Concurrency

This document puts no requirements on the lease expiration implementation for Kea 1.0 to process expired leases in a separate thread or process. See the Design for details on this topic.

Last modified 22 months ago Last modified on Jan 20, 2016, 11:29:12 AM