Problem:
Trying to get dhcp working on an external foreman-proxy.
Create DHCP Settings for test.domain.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://proxy.domain.com:8443/dhcp
Expected outcome:
Same behaviour and setup as for DHCP on Foreman, which I have working (different sites, not looking for HA)
Foreman and Proxy versions:
Foreman & proxy: v3.15
Foreman and Proxy plugin versions:
proxy dhcp and tftp plugins: v3.15
Distribution and version:
Foreman server w Katello: CentOS stream 9
External Foreman proxy: Ubuntu 20.04
Other relevant data:
Is an omapi key needed if dhcpd runs on the foreman-proxy machine? The following makes me think it is, but why is it different from running dhcpd on Foreman itself?:
2025-07-25T12:35:16 eaa90284 [I] Started POST /dhcp/10.2.5.0
2025-07-25T12:35:17 eaa90284 [E] Omshell failed: omshell= > > > dhcpctl_connect: no more
omshell= > not connected.
omshell= > no open object.
omshell= > no open object.
omshell= > no open object.
omshell= > no open object.
omshell= > no open object.
omshell= > not connected.
omshell= >
2025-07-25T12:35:17 eaa90284 [E] Failed to add DHCP reservation for test.domain.com (10.255.25.243 / bc:24:11:bc:15:83): No response from DHCP server
2025-07-25T12:35:17 eaa90284 [W] Error details for Failed to add DHCP reservation for test.domain.com (10.2.5.243 / bc:24:11:bc:15:83): No response from DHCP server: <Proxy::DHCP::Error>: Failed to add DHCP reservation for test.domain.com (10.2.5.243 / bc:24:11:bc:15:83): No response from DHCP server
It turns out omshell on Debian (11), Ubuntu 20.04 and 22.04 is broken.
I added the omapi key to ISC and Foreman-proxy, just in case. This resolved the omshell errors reported, but things still didn’t work. Then I found these links about omshell:
Replacing the Ubuntu default version of omshell (v4.4.1) with v4.4.3 fixed the issue for me. I used the instructions from the last link (post 18 of the Launchpad bug report).