Open Masber opened 9 months ago
I have a stab at a dhcpd container that pulls from SMD as a single source of truth here: https://github.com/OpenCHAMI/dnsmasq-dhcpd . We've tested it at LANL and nothings broken yet at a small scale. The container's also up on the packages section of this org too if you wanted to pull it.
This presupposes that we can make a change on SMD, and have it reflected in DHCP and then see it on the node. Shouldn't be too hard to invalidate a dhcp lease, but the node will need to know that it should re-request a lease.
Is your feature request related to a problem? Please describe.
Use case:
A tenant needs to change the IPs of their compute nodes. Currently this would mean changes to their DHCP IP mapping. Also, SMD stores the IP mapping (relationship between the MAC address, IP address and ComponentID) and offers CRUD operations through
/Inventory/EthernetInterfaces/{ethInterfaceID}
endpoint to check and update this information.The Problem
I may be wrong but it seems like SMD and the DHCP IP mapping are managed independently, meaning, we need to update the IP mapping information in two different places, this is prone to human errors.
Describe the solution you'd like
One idea would be if SMD could update the DHCP server to IP mapping (IP address, MAC address, component ID). Ideally SMD would relay on DHCP data and keep a single source of truth, this depends on performance and SMD response time.
For instance
The user could submit an http request
PATCH@/Inventory/EthernetInterfaces/{ethInterfaceID}
and update the IP of a network interface assigned to a compute node and not worry to having tohe DHCP separately, this would reduce human errors and simplify operational tasks in the system.Describe alternatives you've considered
I mentioned about keeping a single source of truth by making SMD reading and updating the DHCP configuration directly, I have seen this open source DHCP server implementation https://www.isc.org/kea/ which can use postgres to store information and also seems like it has a REST API?
If this is not desired, then maybe SMD could keep its own IP mapping and update the DHCP on demand.
Additional context