“Unable to set DHCP entry” when I finish the New Host operation

I am using the Version 1.8.2 and I install and configure the dhcp on
CentOS7, but still met this issue.

The Error Discription:

Unable to save
Create DHCP Settings for foreman7.beijing.com task failed with the
following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP
entry ([RestClient::BadRequest]: 400 Bad Request) for proxy
https://foreman.beijing.com:8443/dhcp

The Infomation for your reference:

My dhcp.conf content as follows:
[root@foreman settings.d]# cat /etc/dhcp/dhcpd.conf

··· # # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.example # see dhcpd.conf(5) man page # ddns-update-style interim; ignore client-updates; authoritative; allow booting; allow bootp;

omapi-port 7911;
key omapi_key {
algorithm HMAC-MD5;
secret
"IVahEDZddK2vNvxRbSnePRlIN1bvhfscOIJ1RElr4lzlIric1GrIBBqhdHj9cJAkc3y1c/YITqqE1oEg9YB8FA==";
}
omapi-key omapi_key;

subnet 192.168.80.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option domain-name “beijing.com”;
option log-servers syslog;
option ntp-servers ntp;
range dynamic-bootp 192.168.80.150 192.168.80.200;
default-lease-time 21600;
max-lease-time 43200;
}

And the dhcp.yml is:

[root@foreman settings.d]# cat dhcp.yml

Enable DHCP management

#:enabled: false
:enabled: true
#:enabled: https

valid vendors:

- isc

- native_ms (Microsoft native implementation)

- virsh (simple implementation for libvirt)

The vendor can be either isc or native_ms

:dhcp_vendor: isc

dhcp_subnets is a Native MS implementation setting. It restricts the

subnets queried to a

subset, so as to reduce the query time.

#:dhcp_subnets: [192.168.205.0/255.255.255.128,
192.168.205.128/255.255.255.128]

Settings for Ubuntu ISC

#:dhcp_config: /etc/dhcp3/dhcpd.conf
#:dhcp_leases: /var/lib/dhcp3/dhcpd.leases

Settings for Redhat ISC

#:dhcp_config: /etc/dhcpd.conf
:dhcp_config: /etc/dhcp/dhcpd.conf
:dhcp_leases: /var/lib/dhcpd/dhcpd.leases
#omapi
:dhcp_key_name: omapi_key
:dhcp_key_secret:
IVahEDZddK2vNvxRbSnePRlIN1bvhfscOIJ1RElr4lzlIric1GrIBBqhdHj9cJAkc3y1c/YITqqE1oEg9YB8FA==
#subnet
:dhcp_subnets: [192.168.80.150/255.255.255.0, 192.168.80.200/255.255.255.0]

I have no idea what’s wrong with it!

I have noticed that the smart proxy has some problem:

https://lh3.googleusercontent.com/-6Djn-IO7yzU/VYJ7vZmXeYI/AAAAAAAAAB8/Tv-rGKGJwU4/s1600/CentOS7-2015-06-18-16-03-13.png

https://lh3.googleusercontent.com/-H0qyrDJyf3A/VYJ7y3QrEhI/AAAAAAAAACE/Iasi3tnrHEg/s1600/CentOS7-2015-06-18-16-02-40.png

Thank you ~

Hello,

as I requested in the support ticket, use foreman-debug tool to upload
full report.

··· -- Later, Lukas #lzap Zapletal

Hi Lukas ,

I am sorry for that, and I use foreman-debug tool to retry, as follows:

[root@foreman settings.d]# foreman-debug

HOSTNAME: localhost
OS: redhat
RELEASE: CentOS Linux release 7.1.1503 (Core)
FOREMAN: 1.8.2
RUBY: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
PUPPET: 3.8.1
DENIALS: 4

A debug file has been created: /tmp/foreman-debug-MCLcB.tar.xz (217276
bytes)

You may want to upload the tarball to our public server via rsync. There is
a
write only directory (readable only by Foreman core developers) for that.
Note
the rsync transmission is UNENCRYPTED:

rsync /tmp/foreman-debug-MCLcB.tar.xz
rsync://theforeman.org/debug-incoming

Do you want to do this now? [y/N] y
Uploading…
The tarball has been uploaded, please contact us on mailing list or IRC.

Thank you~

在 2015年6月18日星期四 UTC+8下午4:13:07,Lukas Zapletal写道:

··· > > Hello, > > as I requested in the support ticket, use foreman-debug tool to upload > full report. > > -- > Later, > Lukas #lzap Zapletal >

Hello,

you haven't configured any pool on your DHCP server. Consult our
documentation how to use our installer to fix that. You will need to
restart the installer on the proxy with:

–dhcp-range "IP1 IP2"

option.

··· -- Later, Lukas #lzap Zapletal

Hi Lukas,

I installed the foreman according to the Foreman 1.8 Manual Chapter 2-
Quick start -> 2.1
instruction(Foreman :: Manual):

I just run "foreman-installer" and didn't offer any options,

Your means is I should be run "foreman-installer --dhcp-range
"192.168.80.150 192.168.80.200"",

Is my understand right?

Thanks a lot!

Xudong

在 2015年6月18日星期四 UTC+8下午7:28:06,Lukas Zapletal写道:

··· > > Hello, > > you haven't configured any pool on your DHCP server. Consult our > documentation how to use our installer to fix that. You will need to > restart the installer on the proxy with: > > --dhcp-range "IP1 IP2" > > option. > > -- > Later, > Lukas #lzap Zapletal >

Please read our manual carefully, all of it. Answer is there.

LZ

··· On Thu, Jun 18, 2015 at 05:33:08AM -0700, Xudong Li wrote: > Hi Lukas, > > I installed the foreman according to the Foreman 1.8 Manual Chapter 2- > Quick start -> 2.1 > instruction(http://theforeman.org/manuals/1.8/index.html#2.Quickstart): > > I just run "foreman-installer" and didn't offer any options, > > Your means is I should be run "foreman-installer --dhcp-range > "192.168.80.150 192.168.80.200"", > > Is my understand right? > > Thanks a lot! > > Xudong > > > > 在 2015年6月18日星期四 UTC+8下午7:28:06,Lukas Zapletal写道: > > > > Hello, > > > > you haven't configured any pool on your DHCP server. Consult our > > documentation how to use our installer to fix that. You will need to > > restart the installer on the proxy with: > > > > --dhcp-range "IP1 IP2" > > > > option. > > > > -- > > Later, > > Lukas #lzap Zapletal > > > > -- > 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. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas #lzap Zapletal

You are right and I found the answer in the Manual, It should be like this:

foreman-installer --foreman-proxy-dhcp-range "192.168.80.150
192.168.80.200"

I have made some mistakes during the foreman intallation, and spend a lot
of time to fix it,

Thank you all the same!

Xudong

在 2015年6月18日星期四 UTC+8下午8:57:04,Lukas Zapletal写道:

··· > > Please read our manual carefully, all of it. Answer is there. > > LZ > > On Thu, Jun 18, 2015 at 05:33:08AM -0700, Xudong Li wrote: > > Hi Lukas, > > > > I installed the foreman according to the Foreman 1.8 Manual Chapter 2- > > Quick start -> 2.1 > > instruction(http://theforeman.org/manuals/1.8/index.html#2.Quickstart): > > > > I just run "foreman-installer" and didn't offer any options, > > > > Your means is I should be run "foreman-installer --dhcp-range > > "192.168.80.150 192.168.80.200"", > > > > Is my understand right? > > > > Thanks a lot! > > > > Xudong > > > > > > > > 在 2015年6月18日星期四 UTC+8下午7:28:06,Lukas Zapletal写道: > > > > > > Hello, > > > > > > you haven't configured any pool on your DHCP server. Consult our > > > documentation how to use our installer to fix that. You will need to > > > restart the installer on the proxy with: > > > > > > --dhcp-range "IP1 IP2" > > > > > > option. > > > > > > -- > > > Later, > > > Lukas #lzap Zapletal > > > > > > > -- > > 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-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > -- > Later, > Lukas #lzap Zapletal >