Opened 8 months ago

Closed 6 months ago

#5532 closed enhancement (complete)

Caching Host backend

Reported by: tomek Owned by: fdupont
Priority: medium Milestone: Kea1.4
Component: host-reservations Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 12
Total Hours: 0 Internal?: no

Description

The RadiusDesign calls for implementing a cache for host reservations returned by other backends. This ticket should cover the implementation. It should:

  • keep the hosts in memory
  • write the hosts to disk
  • read the hosts from disk
  • implement a simple cache control (the maximum number of hosts to remember)
  • it must be possible to disable cache control

Care should be taken for this code to properly support user context.

This ticket is expected to cover the implementation, but not actually extend HostMgr? with the logic to add hosts returned by other host backends.

Subtickets

Change History (12)

comment:1 Changed 7 months ago by fdupont

  • Owner set to fdupont
  • Status changed from new to accepted

Based on #5528 and #5531.

comment:2 Changed 7 months ago by fdupont

  • Add Hours to Ticket changed from 0 to 6

Did the core code for DHCPv4.
A question: what is the best action on duplicates (CfgHost? (the model) throws, I changed to log and return none)?
To do:

  • core DHCPv6
  • feeding
  • LRU garbage collection
  • cache-get, cache-write and cache-load
  • tests!

BTW I already included some fixes for the host command hook broken by #5528/#5531.

comment:3 Changed 7 months ago by fdupont

  • Add Hours to Ticket changed from 6 to 5

Code done. There are a few points to discuss, for instance hardware address vs DUID conflict (I have a solution but IMHO too complex).
Doc is still to be done, i.e., the .dox file is a skeleton.

comment:4 Changed 7 months ago by fdupont

  • Add Hours to Ticket changed from 5 to 12

comment:5 Changed 7 months ago by fdupont

  • Owner changed from fdupont to UnAssigned
  • Status changed from accepted to reviewing

Doc done. Ready for review (after previous tickets).

comment:6 Changed 7 months ago by fdupont

  • Owner changed from UnAssigned to fdupont

comment:7 Changed 7 months ago by fdupont

  • Owner changed from fdupont to UnAssigned

Only the core trac5532 must be reviewed. For the premium code please review directly trac5534a.

comment:8 Changed 7 months ago by fdupont

Changed premium trac5534a by trac5533.

comment:9 Changed 7 months ago by fdupont

For Kea core please review directly trac5533.

comment:10 Changed 7 months ago by tomek

  • Owner changed from UnAssigned to tomek

Since 5528, 5531, 5532, 5433 and 5534 are on the same branch, reviewing all them at once.

comment:11 Changed 7 months ago by tomek

  • Owner changed from tomek to fdupont

comment:12 Changed 6 months ago by fdupont

  • Resolution set to complete
  • Status changed from reviewing to closed

5533 was merged. Closing.

Note: See TracTickets for help on using tickets.