[kea-dev] Design for Kea Host Reservation

Marcin Siodelski marcin at isc.org
Tue Sep 30 13:11:40 UTC 2014


The HostMgr class is meant to use any derivation of HostDataSource or
CachedHostDataSource instead of MySQL, or any other backend we will
implement in the future. This is a similar concept as the one that we
implemented for lease storage.

In other words, if you have a proprietary storage for your host
reservations (which maybe holds some additional information about
hosts/subscribers connected to your network), you'll need to implement a
class that derives from HostDataSource or CachingHostDataSource which
will retrieve the required information from your proprietary storage and
setup the HostMgr to use this data source, instead of MySQL.

Having said that, it would be quite interesting to get the feedback from
you about the proposed API that the HostDataSource exposes. In
particular, it would like to know if the amount and type of data is
sufficient and that the criteria for searching for host reservations is
sufficient (MAC, DUID etc.)

The HostMgr will be a front end for the allocation engine to obtain a
reservation for the host before it attempts to dynamically allocate a
lease. Regardless, whether the allocated prefix or address comes from
the reservation (via HostMgr) or is dynamically allocated, you will
still have a chance to override this selection via hooks.

You will still be able bypass the subnet selection step with hooks, but
the HostDataSource API assumes existence of some subnet id to identify
which subnet the client is connected to. Obviously, if your custom
libraries don't make use of subnet id, your custom backend may ignore
subnet id value passed via API and the dummy value can be passed to
getHost functions.


On 30/09/14 14:16, Angelo Failla wrote:
> This looks promising, I still have to read the doc properly but here is
> one question for you :)
> Are you guys thinking of making this new HR code extensible in way similar
> to the Hook APIs?
> We currently use bind10 in production with a custom hook lib that bypasses
> subnet allocation logic and just fetches this info connecting to one of
> our backend systems.
> It would be very powerful to make people able to override the source class
> (HostDataSource) or just provide more hook points (I believe this is how
> you call them) so that you could fetch host information from other sources
> that are not mysql databases or any supported source (think about some
> backend system already present in people¹s production networks)
> I spoke with Vicky a while ago promising that I¹ll be working on testing
> my hook code with KEA0.9, unfortunately I didn¹t manage to get to that
> point, we are still using bind10, but we should migrate to KEA0.9 starting
> end of October. 

More information about the kea-dev mailing list