Foreman-Proxy + DHCP Failover

Problem:
I have one foreman instance and two isc-dhcp servers working in failover mode, sharing config using an nfs server.
I would like to use foreman-proxy to control both of the dhcpd servers to create the static leases, pxe file, etc.
I see here two ways of doing it:

  1. Deploy one foreman-proxy instance on the foreman node and edit settings to control both dhcpd servers using remote-isc plugin.
  2. Deploy two foreman-proxy instances on the dhcp nodes. And integrate them into the foreman instance.
  3. Install Foreman-Proxy on both dhcp nodes with the default isc-dhcp (wipe installed isc-dhcp first) included in the foreman-installer. (and configure for high availability)

Is here anyone, who knows, how to configure the smartproxy in one of these ways, to support the control of both dhcp servers? (Using e.g. foreman-installer -i)

Expected outcome:
Control of both dhcp servers using foreman-proxy

Foreman and Proxy versions:
Foreman 2.1
Forean-Proxy 2.1 (?, included in the installer)

Foreman and Proxy plugin versions:
default/included in the installer

Distribution and version:
CentOS 8
dhcpd 4.3.6 (dnf install)

Other relevant data:

My current dhcpd configuration of both nodes is uploaded on the following gist:

If this is a feature included in the newest build (2.2, nightly) please give a hint.

If your config is shared, why would you want to manage both DHCP servers? Manage just one, the other will see the up-to-date data. The same goes for TFTP (it is just a folder on disk).

Or explain what exactly are you trying to achieve. Don’t understand.

1 Like

Thank you for your reply.

My Goal is to have a high available DHCP Server, which I can control using the smartproxy. But for this to Work I would either need

  • two smartproxies (in the DHCP Server itself installed), individually controlling one DHCP server or
  • one smartproxy, which would be capable of controlling both dhcp servers.

The Problem I see, is, that I would need to control the First and the second dhcp server as well, from the smartproxy, because all omapi calls to the first would fail, If the first dhcp server fails/is down.
At least If I choose the option to install only one smartproxy, the smartproxy would then need to be able to have both hosts registered to use the omapi port on both servers.

True. Well, we don’t have anything that can help you in this situation. Maybe some heartbeat with IP switchover? I think that’s an overkill for DHCP tho.

The installer does have support for setting up DHCP failover, though I have no personal experience with it. I’d recommend looking at foreman-installer --full-help. There’s some --foreman-proxy-dhcp-failover parameters.