DHCP settings: "Unable to save" "Remove DHCP Settings for coralia task failed with the following error: 400 Bad Request"

I’ve been able to build a host, “coralia,” with Foreman using the DHCP-given IP address, which remains after boot. However, when attempting to set an assigned IP address (which is already configured in DNS), Foreman rejects the change in the WUI with the error from the subject line of this topic. I combed through the logs and the (verbose) output is attached/follows. I can’t see any obvious permissions problems, and the omapi key is set and I don’t see any errors there, either, so I wonder what’s preventing the DHCP override…

–Dan

··· Daniel Alex Finkelstein • Sr Dev Ops Engineer • SunGard Financial Systems • Kiodex • 59 Maiden Lane Fl 32, New York, NY 10038 • tel +1-646-445-1228 • fax +1-212-682-5892 • daniel.finkelstein@sungard.com

[http://my.knowhow.sungard.com/_layouts/images/SunGard%20Signature/Signature1.png]http://www.sungard.com/ten

Join the online conversation with SunGard’s customers, partners and Industry experts and find an event near you at: www.sungard.com/tenhttp://www.sungard.com/ten.

P Think before you print

CONFIDENTIALITY: This e-mail (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this e-mail in error, please notify the sender and delete this e-mail from your system.

From the proxy log (thanks for the reminder!) I see something about a
static assignment, which is confounding since the IP is from the DHCP's
dynamic range (both in the DHCP server and in the configuration of Foreman
for the subnet):

Log snippet:
/usr/share/foreman-proxy/bin/…/lib/sinatra-patch.rb:43:in run!' /usr/share/foreman-proxy/bin/smart-proxy:44 D, [2013-09-06T14:07:47.127194 #22210] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf D, [2013-09-06T14:07:47.127378 #22210] DEBUG -- : Loading subnets for 127.0.0.1 D, [2013-09-06T14:07:47.127485 #22210] DEBUG -- : Added 10.238.27.128/255.255.255.128 to 127.0.0.1 D, [2013-09-06T14:07:47.127644 #22210] DEBUG -- : Loading subnet data for 10.238.27.128/255.255.255.128 D, [2013-09-06T14:07:47.129318 #22210] DEBUG -- : Added 10.238.27.185 / xx:xx:xx:xx:xx:xx to 10.238.27.128/255.255.255.128 W, [2013-09-06T14:07:47.129938 #22210] WARN -- : Record 10.238.27.185 / xx:xx:xx:xx:xx:xx already exists in 10.238.27.128/255.255.255.128 - can't add again I, [2013-09-06T14:07:47.129990 #22210] INFO -- : Enumerated hosts on 10.238.27.128 D, [2013-09-06T14:07:47.130045 #22210] DEBUG -- : Lazy loaded 10.238.27.128/255.255.255.128 records E, [2013-09-06T14:07:47.130212 #22210] ERROR -- : 10.238.27.185 / xx:xx:xx:xx:xx:xx is static - unable to delete D, [2013-09-06T14:07:47.130265 #22210] DEBUG -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:14:indelRecord'

–Dan

··· On Friday, September 6, 2013 1:22:52 PM UTC-4, Daniel Finkelstein wrote: > > I’ve been able to build a host, “coralia,” with Foreman using the > DHCP-given IP address, which remains after boot. However, when attempting > to set an assigned IP address (which is already configured in DNS), Foreman > rejects the change in the WUI with the error from the subject line of this > topic. I combed through the logs and the (verbose) output is > attached/follows. I can’t see any obvious permissions problems, and the > omapi key is set and I don’t see any errors there, either, so I wonder > what’s preventing the DHCP override… > > > > --Dan > > > > *Daniel Alex Finkelstein* • Sr Dev Ops Engineer • SunGard Financial > Systems • Kiodex • 59 Maiden Lane Fl 32, New York, NY 10038 • tel > +1-646-445-1228 • fax +1-212-682-5892 • daniel.finkelstein@sungard.com > > > > [image: > http://my.knowhow.sungard.com/_layouts/images/SunGard%20Signature/Signature1.png] > > > > *Join the online conversation with SunGard’s customers, partners and > Industry experts and find an event near you at: **www.sungard.com/ten* > *. * > > > > P *Think before you print * > > > > CONFIDENTIALITY: This e-mail (including any attachments) may contain > confidential, proprietary and privileged information, and unauthorized > disclosure or use is prohibited. If you received this e-mail in error, > please notify the sender and delete this e-mail from your system. > > >

> From: "Daniel Finkelstein" <Daniel.Finkelstein@sungard.com>
> To: foreman-users@googlegroups.com
> Sent: Friday, September 6, 2013 1:22:52 PM
> Subject: [foreman-users] DHCP settings: "Unable to save" "Remove DHCP Settings for coralia task failed with the
> following error: 400 Bad Request"
>
> I’ve been able to build a host, “coralia,” with Foreman using the DHCP-given
> IP address, which remains after boot. However, when attempting to set an
> assigned IP address (which is already configured in DNS), Foreman rejects
> the change in the WUI with the error from the subject line of this topic. I
> combed through the logs and the (verbose) output is attached/follows. I
> can’t see any obvious permissions problems, and the omapi key is set and I
> don’t see any errors there, either, so I wonder what’s preventing the DHCP
> override…

Check out the logs on your proxy, too. They probably have more info about the issue.

··· ----- Original Message -----

–Dan

Daniel Alex Finkelstein • Sr Dev Ops Engineer • SunGard Financial Systems •
Kiodex • 59 Maiden Lane Fl 32, New York, NY 10038 • tel +1-646-445-1228 •
fax +1-212-682-5892 •
daniel.finkelstein@sungard.commailto:daniel.finkelstein@sungard.com

[http://my.knowhow.sungard.com/_layouts/images/SunGard%20Signature/Signature1.png]http://www.sungard.com/ten

Join the online conversation with SunGard’s customers, partners and Industry
experts and find an event near you at:
www.sungard.com/tenhttp://www.sungard.com/ten.

P Think before you print

CONFIDENTIALITY: This e-mail (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you received this e-mail in error,
please notify the sender and delete this e-mail from your system.


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/groups/opt_out.

We ran into this problem as well. The only solution we found was to
manually remove the entries for this MAC/IP from
/var/lib/dhcpd/dhcpd.leases from the commandline. My one host had 8 entries
in dhcpd.leases.

I'm not clear if dhcpd or Foreman actually added the entries to
dhcpd.leases, but it appears that maybe both services are conflicting with
each other.

-= Stefan

··· On Friday, September 6, 2013 11:14:23 AM UTC-7, Daniel Finkelstein wrote: > > From the proxy log (thanks for the reminder!) I see something about a > static assignment, which is confounding since the IP is from the DHCP's > dynamic range (both in the DHCP server and in the configuration of Foreman > for the subnet): > > Log snippet: > /usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:43:in `run!' > /usr/share/foreman-proxy/bin/smart-proxy:44 > D, [2013-09-06T14:07:47.127194 #22210] DEBUG -- : Reading config file > /etc/dhcp/dhcpd.conf > D, [2013-09-06T14:07:47.127378 #22210] DEBUG -- : Loading subnets for > 127.0.0.1 > D, [2013-09-06T14:07:47.127485 #22210] DEBUG -- : Added > 10.238.27.128/255.255.255.128to 127.0.0.1 > D, [2013-09-06T14:07:47.127644 #22210] DEBUG -- : Loading subnet data for > 10.238.27.128/255.255.255.128 > D, [2013-09-06T14:07:47.129318 #22210] DEBUG -- : Added 10.238.27.185 / > xx:xx:xx:xx:xx:xx to 10.238.27.128/255.255.255.128 > W, [2013-09-06T14:07:47.129938 #22210] WARN -- : Record 10.238.27.185 / > xx:xx:xx:xx:xx:xx already exists in 10.238.27.128/255.255.255.128- can't add again > I, [2013-09-06T14:07:47.129990 #22210] INFO -- : Enumerated hosts on > 10.238.27.128 > D, [2013-09-06T14:07:47.130045 #22210] DEBUG -- : Lazy loaded > 10.238.27.128/255.255.255.128records > E, [2013-09-06T14:07:47.130212 #22210] ERROR -- : 10.238.27.185 / > xx:xx:xx:xx:xx:xx is static - unable to delete > D, [2013-09-06T14:07:47.130265 #22210] DEBUG -- : > /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:14:in > `delRecord' > > --Dan > > On Friday, September 6, 2013 1:22:52 PM UTC-4, Daniel Finkelstein wrote: >> >> I’ve been able to build a host, “coralia,” with Foreman using the >> DHCP-given IP address, which remains after boot. However, when attempting >> to set an assigned IP address (which is already configured in DNS), Foreman >> rejects the change in the WUI with the error from the subject line of this >> topic. I combed through the logs and the (verbose) output is >> attached/follows. I can’t see any obvious permissions problems, and the >> omapi key is set and I don’t see any errors there, either, so I wonder >> what’s preventing the DHCP override… >> >> >> >> --Dan >> >> >> >> *Daniel Alex Finkelstein* • Sr Dev Ops Engineer • SunGard Financial >> Systems • Kiodex • 59 Maiden Lane Fl 32, New York, NY 10038 • tel >> +1-646-445-1228 • fax +1-212-682-5892 • daniel.finkelstein@sungard.com >> >> >> >> [image: >> http://my.knowhow.sungard.com/_layouts/images/SunGard%20Signature/Signature1.png] >> >> >> >> *Join the online conversation with SunGard’s customers, partners and >> Industry experts and find an event near you at: **www.sungard.com/ten**. >> * >> >> >> >> P *Think before you print * >> >> >> >> CONFIDENTIALITY: This e-mail (including any attachments) may contain >> confidential, proprietary and privileged information, and unauthorized >> disclosure or use is prohibited. If you received this e-mail in error, >> please notify the sender and delete this e-mail from your system. >> >> >> >

From the proxy log (thanks for the reminder!) I see something about a
> static assignment, which is confounding since the IP is from the DHCP's
> dynamic range (both in the DHCP server and in the configuration of Foreman
> for the subnet):
>

Well, when you use the smart proxy for DHCP then Foreman, when creating a
new machine, gets an IP from the DHCP pool and statically associates it
with the MAC address of the machine, by adding an entry in
/var/lib/dhcpd/dhcpd.leases (at least when using the ISC DHCP server).
That's why the log contains references to a static assignment, I suppose.

Anyway, your log also shows that the IP you are trying to manually set is
already used in the DHCP server assignments, so maybe that's why it can't
be deleted and your problem might be caused by something previously
happened with that IP.
Just a guess on my side…

Marco

··· On Friday, September 6, 2013 8:14:23 PM UTC+2, Daniel Finkelstein wrote: