Project

General

Profile

Bug #8151

Updated by Dominic Cleal over 7 years ago

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1156371

<pre>

[root@nightly ~]# ll /etc/dhcp -d
drwxr-xr-x. 3 root root 4096 Oct 22 08:02 /etc/dhcp

[root@nightly ~]# yum reinstall dhcp
...
Complete!

[root@nightly ~]# ll /etc/dhcp -d
drwxr-x---. 3 root root 4096 Oct 24 05:16 /etc/dhcp

[root@nightly ~]# service foreman-proxy restart
Stopping foreman-proxy: [ OK ]
Starting foreman-proxy: [ OK ]

[root@nightly ~]# curl -H "Accept:application/json" -k --cert /var/lib/puppet/ssl/certs/nightly.zzz.lan.pem --key /var/lib/puppet/ssl/private_keys/nightly.zzz.lan.pem https://nightly.zzz.lan:8443/dhcp/192.168.222.0
Unable to find the DHCP configuration or lease files

[root@nightly ~]# chmod o+x /etc/dhcp

[root@nightly ~]# curl -H "Accept:application/json" -k --cert /var/lib/puppet/ssl/certs/nightly.zzz.lan.pem --key /var/lib/puppet/ssl/private_keys/nightly.zzz.lan.pem https://nightly.zzz.lan:8443/dhcp/192.168.222.0
{"leases":[],"reservations":[]}
</pre>


Therefore the workaround is to do chmod o+x /etc/dhcp in the sysvinit/systemd startup script of the proxy.

QA: To verify the bug, use the scenario above, plus make sure the foreman installer in dry run (-n) does not print any other planned changes:

<pre>
[root@nightly ~]# foreman-installer -v -n
...
[ WARN 2014-10-24 06:07:35 verbose] /File[/etc/dhcp]/mode: current_value 0751, should be 0755 (noop)
...
</pre>


Also try to reinstall other software to verify similar scenarios: dhcp, bind, tftp, puppet, bmc/ipmi, facter.

For the record, there are more of these:

yum reinstall dhcp bind tftp-server puppet facter

Then:

<pre>
[ WARN 2014-10-24 08:58:18 verbose] /File[/var/named/dynamic]/mode: current_value 0770, should be 0750 (noop)
[ WARN 2014-10-24 08:58:19 verbose] /File[/etc/dhcp]/mode: current_value 0750, should be 0755 (noop)
</pre>

Back