-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Replace dnsmasq for dhcp. #50
Comments
Before evaluating our options to determine which solution to pursue, I think it Please correct/clarify anything that's incorrect. What do we want in a DHCP service?The need seems to be to have a DHCP server that behaves like a microservice and:
Evaluating Current OptionsCoreDHCP + PluginWith a plugin, CoreDHCP could achieve 3 (as demonstrated by the included netbox CoreDHCP stores its configuration as a YAML file, so a file-based storage CoreDHCP does not include a PXE/TFTP stack (4) and I could not locate a plugin Extended netbootdNetbootd has an API that allows fetching/setting/deleting node configuration In order to be able to communicate with SMD (3), netbootd will need to be Finally, it has its own PXE/TFTP stack (4), which reduces its need to depend on ConclusionIt seems that, of the two options above, netbootd has more functionality already But, if others disagree or know of a more appropriate solution that already |
I have a few comments. First, let's check the assumptions both implicit and explicit in the five requirements you list.
Second, I'd like to dig in further with your assessment of both options. I don't agree with the limitations you list for CoreDHCP. Given the nature of the plugins, I see no reason that a CoreDHCP plugin couldn't maintain an internal cache of all MAC<-->IP mappings and update them asynchronously from SMD or even expose that cache for API update. The only configuration information that needs to go in the file is the SMD url and perhaps a secret for use in pulling data. Having said that, CoreDHCP does only handle DHCP and wouldn't address the other needs for HTTP or tftp. So, we'd need to have different services to handles those things. I wonder what the overlap is between the SMD client information needed for cloud-init and the SMD client information needed for dhcp? Your assessment of netbootd makes sense to me. The risk I see in it is the degree we'll need to customize it for our needs and the degree of collaboration we can expect from the netbootd author/community. Do you feel confident that we can manage integrating this service and contributing back? What's the risk that we end up maintaining an incompatible fork? Since netbootd is a thin wrapper around some go libraries, should we consider building our own solution which is similar to netbootd, but more targeted at our use cases? |
We may want to explore the netbox plugin for inspiration for our SMD plugin. |
@alexlovelltroy regarding your response:
Looking back at my evaluation after your comments, I can see how using CoreDHCP as a base and writing a plugin, relegating TFTP (and HTTP if OpenCHAMI supports HTTP booting in the future) to separate services, would comparmentalize the amount of custom code that we would need to maintain and allow us to plug functionality. I think it's worth attempting to see what can be done. I'll see if I can put something together for this. Footnotes
|
I have created two plugins for CoreDHCP (living in one repo) that communicate with SMD for DHCP requests: https://github.com/OpenCHAMI/coresmd There have been recent additions to SMD (OpenCHAMI/smd#34, OpenCHAMI/smd#35) and Magellan (OpenCHAMI/magellan#62) that allow BMC information (e.g. MAC and IP addresses) to be stored in SMD on discovery using Components and EthernetInterfaces, allowing them to be queried. This means that these data can be queried in SMD to see if a MAC address requesting an IP is known to SMD. The coresmd plugin hands out DHCP leases to SMD-known MAC addresses. There is also the bootloop plugin, which is like CoreDHCP's "range" plugin except that it:
These steps ensure that nodes/BMCs/etc. unknown to SMD will get temporary IP addresses, but will constantly be requesting new ones in the case that they become known to SMD. This also allows BMCs to be discovered dynamically so that they can be easily added to SMD. For admins that care about which IPs are assigned to which MACs (e.g. for BMCs), CoreDHCP's "file" plugin is useful for this. There is an example configuration that includes how to use these plugins in a CoreDHCP minimal working config file. |
As stated in OpenCHAMI/deployment-recipes#3, we know that dnsmasq will only take us so far with this project. We'll need something else to take over. We learned a lot from the work on dnsmasq that we can apply to the future.
I propose that there are two viable options here for how to proceed.
We create plugins for coredns and coredhcp to handle our internal dhcp and dns. There is an example of a plugin from five years ago in the coredhcp repository that we could start from Netbox Plugin.
We adopt, and potentially extend, netbootd as our standalone bootscript server and use configurator to generate the appropriate manifest file(s)
It may make sense to entertain other options, but we need to decide and move fairly quickly as part of our LANL objective for 2024/25 #47
The text was updated successfully, but these errors were encountered: