Unable to find DHCP configuration or lease files

Hello,

I've had a working foreman system for few months now. I've used it to
deploy systems via PXE/TFTP/DHCP many times. However for reasons still
unknown, I'm suddenly unable to allocate DHCP addresses to my hosts.
From what I can tell, it appears that the smart-proxy isn't able to
read /var/lib/dhcpd/dhcpd.lease files, snip from /tmp/proxy.log
output:

(note, version is foreman-proxy-0.2-3)

tail -f /tmp/proxy.log
E, [2011-09-28T11:02:44.794984 #26979] ERROR – : Unable to find the
DHCP configuration or lease files
E, [2011-09-28T11:03:03.926924 #28015] ERROR – : Unable to find the
DHCP configuration or lease files
E, [2011-09-28T11:03:04.633221 #28015] ERROR – : Unable to find the
DHCP configuration or lease files

I'm using ISC DHCP (the system is RHEL6). Here are the permissions on
the dhcpd lease directory:

ls -la /var/lib/dhcpd
total 24
drwxr-xr-x 2 foreman-proxy foreman-proxy 4096 Sep 28 11:04 .
drwxr-xr-x. 28 root root 4096 Jun 14 22:28 …
-rw-r–r-- 1 foreman-proxy foreman-proxy 0 Aug 11 03:22
dhcpd6.leases
-rw-r–r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 11:04
dhcpd.leases
-rw-r–r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 10:52
dhcpd.leases~

The relevant snippet from /etc/foreman-proxy/settings.yml:

Enable DHCP management

:dhcp: true

The vendor can be either isc or native_ms

:dhcp_vendor: isc
:dhcp_config: /etc/dhcp/dhcpd.conf
:dhcp_leases: /var/lib/dhcpd/dhcpd.leases

Am I overlooking something obvious? Anyways, I figured extra eyes on
this would help :slight_smile:

I think there was an update on the dhcpd packages that changed
directory permissions on /etc/dhcp to be readable only by root.

One way to solve the problem is to change the group permissions on the
lease and conf files to be accessible by the foreman proxy user.

Ohad

··· On Wed, Sep 28, 2011 at 7:11 PM, Luke Baker wrote: > Hello, > > I've had a working foreman system for few months now. I've used it to > deploy systems via PXE/TFTP/DHCP many times. However for reasons still > unknown, I'm suddenly unable to allocate DHCP addresses to my hosts. > From what I can tell, it appears that the smart-proxy isn't able to > read /var/lib/dhcpd/dhcpd.lease files, snip from /tmp/proxy.log > output: > > (note, version is foreman-proxy-0.2-3) > > tail -f /tmp/proxy.log > E, [2011-09-28T11:02:44.794984 #26979] ERROR -- : Unable to find the > DHCP configuration or lease files > E, [2011-09-28T11:03:03.926924 #28015] ERROR -- : Unable to find the > DHCP configuration or lease files > E, [2011-09-28T11:03:04.633221 #28015] ERROR -- : Unable to find the > DHCP configuration or lease files > > I'm using ISC DHCP (the system is RHEL6). Here are the permissions on > the dhcpd lease directory: > > ls -la /var/lib/dhcpd > total 24 > drwxr-xr-x 2 foreman-proxy foreman-proxy 4096 Sep 28 11:04 . > drwxr-xr-x. 28 root root 4096 Jun 14 22:28 .. > -rw-r--r-- 1 foreman-proxy foreman-proxy 0 Aug 11 03:22 > dhcpd6.leases > -rw-r--r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 11:04 > dhcpd.leases > -rw-r--r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 10:52 > dhcpd.leases~ > > > The relevant snippet from /etc/foreman-proxy/settings.yml: > > # Enable DHCP management > :dhcp: true > # The vendor can be either isc or native_ms > :dhcp_vendor: isc > :dhcp_config: /etc/dhcp/dhcpd.conf > :dhcp_leases: /var/lib/dhcpd/dhcpd.leases > > Am I overlooking something obvious? Anyways, I figured extra eyes on > this would help :) >

drwxr-xr-x. 3 root root 4096 Sep 13 11:04 dhcp
Fixed chmod o+rx

··· On Wednesday, September 28, 2011 12:11:59 PM UTC-4, Luke Baker wrote: > > Hello, > > I've had a working foreman system for few months now. I've used it to > deploy systems via PXE/TFTP/DHCP many times. However for reasons still > unknown, I'm suddenly unable to allocate DHCP addresses to my hosts. > From what I can tell, it appears that the smart-proxy isn't able to > read /var/lib/dhcpd/dhcpd.lease files, snip from /tmp/proxy.log > output: > > (note, version is foreman-proxy-0.2-3) > > tail -f /tmp/proxy.log > E, [2011-09-28T11:02:44.794984 #26979] ERROR -- : Unable to find the > DHCP configuration or lease files > E, [2011-09-28T11:03:03.926924 #28015] ERROR -- : Unable to find the > DHCP configuration or lease files > E, [2011-09-28T11:03:04.633221 #28015] ERROR -- : Unable to find the > DHCP configuration or lease files > > I'm using ISC DHCP (the system is RHEL6). Here are the permissions on > the dhcpd lease directory: > > ls -la /var/lib/dhcpd > total 24 > drwxr-xr-x 2 foreman-proxy foreman-proxy 4096 Sep 28 11:04 . > drwxr-xr-x. 28 root root 4096 Jun 14 22:28 .. > -rw-r--r-- 1 foreman-proxy foreman-proxy 0 Aug 11 03:22 > dhcpd6.leases > -rw-r--r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 11:04 > dhcpd.leases > -rw-r--r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 10:52 > dhcpd.leases~ > > > The relevant snippet from /etc/foreman-proxy/settings.yml: > > # Enable DHCP management > :dhcp: true > # The vendor can be either isc or native_ms > :dhcp_vendor: isc > :dhcp_config: /etc/dhcp/dhcpd.conf > :dhcp_leases: /var/lib/dhcpd/dhcpd.leases > > Am I overlooking something obvious? Anyways, I figured extra eyes on > this would help :) >

Yep that did it – I thought that I had already looked there but I
guess I missed it. Thanks for the sanity check ; )

··· On Oct 2, 2:18 am, Ohad Levy wrote: > On Wed, Sep 28, 2011 at 7:11 PM, Luke Baker wrote: > > Hello, > > > I've had a working foreman system for few months now. I've used it to > > deploy systems via PXE/TFTP/DHCP many times. However for reasons still > > unknown, I'm suddenly unable to allocate DHCP addresses to my hosts. > > From what I can tell, it appears that the smart-proxy isn't able to > > read /var/lib/dhcpd/dhcpd.lease files, snip from /tmp/proxy.log > > output: > > > (note, version is foreman-proxy-0.2-3) > > > tail -f /tmp/proxy.log > > E, [2011-09-28T11:02:44.794984 #26979] ERROR -- : Unable to find the > > DHCP configuration or lease files > > E, [2011-09-28T11:03:03.926924 #28015] ERROR -- : Unable to find the > > DHCP configuration or lease files > > E, [2011-09-28T11:03:04.633221 #28015] ERROR -- : Unable to find the > > DHCP configuration or lease files > > > I'm using ISC DHCP (the system is RHEL6). Here are the permissions on > > the dhcpd lease directory: > > > ls -la /var/lib/dhcpd > > total 24 > > drwxr-xr-x 2 foreman-proxy foreman-proxy 4096 Sep 28 11:04 . > > drwxr-xr-x. 28 root root 4096 Jun 14 22:28 .. > > -rw-r--r-- 1 foreman-proxy foreman-proxy 0 Aug 11 03:22 > > dhcpd6.leases > > -rw-r--r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 11:04 > > dhcpd.leases > > -rw-r--r-- 1 foreman-proxy foreman-proxy 5891 Sep 28 10:52 > > dhcpd.leases~ > > > The relevant snippet from /etc/foreman-proxy/settings.yml: > > > # Enable DHCP management > > :dhcp: true > > # The vendor can be either isc or native_ms > > :dhcp_vendor: isc > > :dhcp_config: /etc/dhcp/dhcpd.conf > > :dhcp_leases: /var/lib/dhcpd/dhcpd.leases > > > Am I overlooking something obvious? Anyways, I figured extra eyes on > > this would help :) > > I think there was an update on the dhcpd packages that changed > directory permissions on /etc/dhcp to be readable only by root. > > One way to solve the problem is to change the group permissions on the > lease and conf files to be accessible by the foreman proxy user. > > Ohad