Hello!

I am running kea in a 2-node HA cluster (hot-standby mode), with manually 
written JSON configuration and memfile lease backend.

We'd like to migrate to using 
netbox-kea-dhcp<https://github.com/francoismdj/netbox-kea-dhcp> to generate 
DHCP configuration. As far as I can tell from reading the source code, the tool 
works by generating configuration based on subnet ID being equal to the prefix 
ID in Netbox. (A prefix in Netbox is an object representing an IP subnet, and 
has its own ID.)

This won't work for us out of the box, because if we just blindly start 
creating subnet objects with prefix IDs that collide with our previous manually 
configured subnet IDs, the lease database will get confused. Therefore, as an 
intermediate step before implementing this sync, I would like to change the 
subnet IDs in my configuration, so the subnet IDs match up with the prefix IDs 
in Netbox.

However, if I just change this in the config, we'll get this lease database 
confusion. Therefore, my idea is to:


  *   In an outage window, stop both kea servers in the cluster to make sure 
the lease database isn't being touched
  *   Change the JSON configuration to update the subnet IDs to the new desired 
subnet IDs, keeping note of the old ones
  *   Run some type of tool to change the subnet ID column of each rows to 
change from the old to new subnet ID (should be easy, it's just a CSV file)
  *   Restart kea

Before I go ahead and do this, I'd like some feedback from the community. Is 
there anything wrong with my approach? And is there an easier way of doing the 
same thing?

(One thing to consider might be to de-couple kea subnet IDs from the netbox 
prefix IDs, and instead use user-context to store the netbox ID and do the 
mapping that way, but that would likely be more work than just doing the 
one-time operation above.)
-- 
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
[email protected]

Reply via email to