cobbler/cobbler — Issue #30: manage_dhcp: two related but different things?
Author: tdlee
Created: 2011-12-16 17:13:53+00:00
State: open

My understanding of "mange_dhcp" is that it does two related, but different, things:

1. Mange the DHCP files (and tftpboot files etc.)
2. Ensure the DHCP server is running.

I think there is a case for separating these. If a site runs with static IP addresses, it is useful to have the configuration periodically cloned. For instance we have a daily cron job "cobbler replicate ..." which replicates everything including the systems onto two slaves. This allows a deployment to pick up from any DHCP server, because they are all identical and the client systems are all static-IP. The real reason for running more than one is for resilience, so really an "exactly one active DHCP instance, with automatic failover" would be sufficient. (Such failover, automatic or otherwise, is beyond the scope of Cobbler.)

But having multiple DHCP servers simultaneously active can introduce problems, especially on dynamic-IP clients. And even in our case of static-IP, the existence of slave servers can interfere with developments on the master.

So I would like to suggest for consideration that there be two controls:
1. "manage_dhcp" to manage the files, as now, but not the DHCP server
2. "manage_dhcp_server" would ensure the server is running.

Of course, these are asymmetrical and not independent. "2" without "1" has no meaning. So it might be better to view them in a different way:

1. "manage_dhcp" to manage the files, as now; also manage DHCP server /unless/ "manage_dhcp_server" disables it
2. "manage_dhcp_server": if set to 0 Cobbler will /not/ mange the DHCP process.

Part of a failover procedure would be to toggle the "manage_dhcp_server" flag.

Or something like that. Or might there be yet a better way to handle all this?