Unable to find the DHCP configuration or lease files after Upgrading to Foreman 1.10

Hi,

I recently updated my foreman to 10 and I am having a heck of a time now
getting my dhcp smart proxy to work. Centos 6.7 Linux.

I have had this foreman since about 1.4 and have updated it without issues
until now.

The problem is this

E, [2016-02-02T12:18:18.693122 #2626] ERROR – : Unable to find the DHCP
configuration or lease files

The thing is this is my config.

··· --- :enabled: https :dhcp_vendor: isc :dhcp_config: /etc/dhcp/dhcpd.conf :dhcp_leases: /var/lib/dhcpd/dhcpd.leases :dhcp_key_name: omapi_key :dhcp_key_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I removed the comments and the key. The only change is I set :enabled: to
https from the true from before.

The foreman web interface is indeed seeing the comments

This is copied from my previous dhcp.yml file.

The files are there, and have the same permissions as before, but maybe
that is wrong?

[1219] root@t2gw03 /etc/foreman-proxy/settings.d# ls -l
/var/lib/dhcpd/dhcpd.leases
-rw-r–r--. 1 dhcpd dhcpd 78725 Feb 2 11:16 /var/lib/dhcpd/dhcpd.leases
[1221] root@t2gw03 /etc/foreman-proxy/settings.d# ls -l /etc/dhcp/dhcpd.conf
-rw-r–r--. 1 root foreman-proxy 871 Feb 3 2015 /etc/dhcp/dhcpd.conf
[1221] root@t2gw03 /etc/foreman-proxy/settings.d#

This is the error in the foreman web interface.

ERF12-4395 [ProxyAPI::ProxyException]: Unable to retrieve DHCP entry for
X.Y.Z.A ([RestClient::BadRequest]: 400 Bad Request) for proxy
https://myhost.doman:8443/dhcp

Thanks for any help.

Terrence

Just as a quick reply to myself, how come a ps shows foreman running as a
PID and not a user…

[1258] root@uclhcpup ~# ps auxw|grep foreman
496 9812 0.2 0.9 144452 36072 ? SNl Jan30 12:14 ruby
/usr/share/foreman-proxy/bin/smart-proxy
root 12440 0.0 0.0 103308 828 pts/0 S+ 12:58 0:00 grep
foreman
foreman 14435 0.1 5.8 608188 229032 ? Sl Jan31 4:00 Passenger
RackApp: /usr/share/foreman
postgres 14442 0.0 0.3 219436 12520 ? Ss Jan31 0:18 postgres:
foreman foreman [local] idle
[1258] root@uclhcpup ~# grep foreman-proxy /etc/passwd
foreman-proxy:x:496:494:Foreman Proxy
account:/usr/share/foreman-proxy:/bin/false
[1258] root@uclhcpup ~#

Not that user should not be able to read the files in question, they are
world readable.

Terrence

Directory permissions were tripping me up. I suspect it was the redhat DHCP
update that caused the issue.

DHCP update that caused the issue.

That would do it, yes. You could consider using our puppet misfires to
maintain the changes that the installer did at the beginning, which
includes DHCP permissions.

The numeric id in ps is simply because the username is too long - ps
switches to an id of it doesn't fit the column.

··· On 2 Feb 2016 10:15 pm, "Terrence Martin" wrote: > > Directory permissions were tripping me up. I suspect it was the redhat

Puppet misfires?

··· On Tue, Feb 2, 2016 at 11:01 PM, Greg Sutcliffe wrote:

On 2 Feb 2016 10:15 pm, “Terrence Martin” twm139@gmail.com wrote:

Directory permissions were tripping me up. I suspect it was the redhat
DHCP update that caused the issue.

That would do it, yes. You could consider using our puppet misfires to
maintain the changes that the installer did at the beginning, which
includes DHCP permissions.

The numeric id in ps is simply because the username is too long - ps
switches to an id of it doesn’t fit the column.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/IuX-HYaT9eE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Puppet "modules" I suspect.

··· -- Dominic Cleal dominic@cleal.org

On 03/02/16 21:43, Terrence Martin wrote:

Puppet misfires?

On Tue, Feb 2, 2016 at 11:01 PM, Greg Sutcliffe > <greg.sutcliffe@gmail.com mailto:greg.sutcliffe@gmail.com> wrote:

On 2 Feb 2016 10:15 pm, "Terrence Martin" <twm139@gmail.com >     <mailto:twm139@gmail.com>> wrote:
>
> Directory permissions were tripping me up. I suspect it was the redhat DHCP update that caused the issue. 

That would do it, yes. You could consider using our puppet misfires
to maintain the changes that the installer did at the beginning,
which includes DHCP permissions.

The numeric id  in ps  is simply because the username is too long -
ps  switches to an id  of it doesn't fit the column.

-- 
You received this message because you are subscribed to a topic in
the Google Groups "Foreman users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/IuX-HYaT9eE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com
<mailto:foreman-users+unsubscribe@googlegroups.com>.
To post to this group, send email to foreman-users@googlegroups.com
<mailto:foreman-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Indeed. Giving mailing list support from a phone keyboard is fraught with
peril :slight_smile:

Greg

··· On 4 Feb 2016 9:11 am, "Dominic Cleal" wrote: > > Puppet "modules" I suspect.