I can’t get a foreman-proxy running on the same server to create dhcp reservations. Stand alone the dhcpd server allocates ip addresses - the dhcpd server was installed via foreman-installer options.
The proxy log file bails out with(/my_valid_hostname/FQDN/):-
021-05-25T10:03:37 4699cf85 [I] Started GET /dhcp/10.162.1.0/unused_ip
2021-05-25T10:03:39 4699cf85 [I] Finished GET /dhcp/10.162.1.0/unused_ip with 200 (2019.06 ms)
2021-05-25T10:04:37 2e580035 [I] Started POST /dhcp/10.162.1.0
2021-05-25T10:06:44 2e580035 [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= >
2021-05-25T10:06:44 2e580035 [E] Failed to add DHCP reservation for FQDN (10.162.1.206 / 00:50:56:a6:9b:61): No response from DHCP server
2021-05-25T10:06:44 2e580035 [W] Error details for Failed to add DHCP reservation for jaime-querio.lab.ctl.gt-t.net (10.162.1.206 / 00:50:56:a6:9b:61): No response from DHCP server: Proxy::DHCP::Error: Failed to add DHCP reservation for FQDN (10.162.1.206 / 00:50:56:a6:9b:61): No response from DHCP server
I’m a little bit lost, can’t seem to extract more detailed logs from dhcpd.
Are you able to start omshell under the foreman-proxy user? Are OMAPI keys configured properly? Compare what’s configured in the ISC DHCP configuration and foreman-proxy dhcp_isc.yaml. Can you connect to the server? Any SELinux denials?
I was able to recreate the problem unintentionally. I had carelessly installed a smart proxy with Ubuntu 20.04, our installation is still based on Ubuntu 18.04 as 20.04 was not supported at that time. Contrary to my expectations, Ubuntu 20.04 is supported in Foreman 2.5.x, which I initially suspected to be the source of the error.
As I am currently very closely connected, I first tried an update to Foreman 3.1, but unfortunately this was unsuccessful.
An installation with Ubuntu 18.04 and Foreman 2.5 does not show this behaviour.
A quick look at a tcpdump shows that the foreman proxy closes the connection although the DHCP server still wants to get rid of data.
Should we create a ticket for this, in which I would be happy to post more details?
There is a bug in Ubuntu ISC DHCP that prevents proxy from completing the request. It was discussed here last week, people applied some patches IIRC and fixed the issue. It was reported to Canonical too.
Hi @lzap
Is this problem also present in Centos dhcpd ? I was testing foreman 3.4 on centos 8 stream and I get the same error.
I started my tests(foreman 3.5) on Ubuntu first. But had the same omshell errors. Lead me to this thread. Tried all the soulutions mentioned here but to no avail. Thought centos might work.
Getting foreman to run successfully in a sandboxed vm has been elusive. Particularly for first time users like myself. DNSMASQ proxy fails as it can’t get freeip. ISC fails due to the Omshell issue. Any pointers would be really helpful. Just to understand in what scenario either DNSMASQ or DHCPD can be run and used with foreman successfully.