Project

General

Profile

Actions

Bug #20834

open

Foreman fails to provision Hosts

Added by Sebastian Finke almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi guys,

we are currently running Foreman (version 1.15.3) to provide Puppet and provisioning. The following steps are made until I receive errors.

1. Hosts are doing Puppetruns and are in "unmanaged" state in Foreman
2. I want to redeploy hosts so I click on "manage Host"
3. I choose which OS to deploy and click "submit"
4. Foreman shows errors

Create DHCP Settings for hostname.domain.lan task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://foremanproxy.domain.lan:8443/dhcp
Failed to perform rollback on Remove DHCP Settings for hostname.domain.lan - ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::Conflict]: 409 Conflict) for proxy https://foremanproxy.domain.lan:8443/dhcp

Logs from the foremanproxy:

I, [2017-09-04T10:14:23.047137 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:23] "GET /features HTTP/1.1" 200 34 0.0006
I, [2017-09-04T10:14:26.831271 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:26] "GET /features HTTP/1.1" 200 34 0.0007
I, [2017-09-04T10:14:41.473909 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:41] "GET /tftp/serverName HTTP/1.1" 200 17 0.0007
I, [2017-09-04T10:14:41.556398 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:41] "GET /dhcp/10.xx.xx.0/mac/db:db:db:db:db:db HTTP/1.1" 200 212 0.0010
I, [2017-09-04T10:14:41.629389 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:41] "GET /dhcp/10.xx.xx.0/ip/10.xx.xx.109 HTTP/1.1" 200 214 0.0006
I, [2017-09-04T10:14:41.826698 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:41] "GET /dhcp/10.xx.xx.0/mac/db:db:db:db:db:db HTTP/1.1" 200 212 0.0006
I, [2017-09-04T10:14:41.909198 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:41] "GET /dhcp/10.xx.xx.0/ip/10.xx.xx.109 HTTP/1.1" 200 214 0.0006
W, [2017-09-04T10:14:42.023858 ]  WARN -- : DELETE dhcp/:network/:record endpoint has been deprecated and will be removed in future versions. Please use DELETE dhcp/:network/mac/:mac_address or DELETE dhcp/:network/ip/:ip_address instead.
I, [2017-09-04T10:14:42.034775 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "DELETE /dhcp/10.xx.xx.0/db:db:db:db:db:db HTTP/1.1" 200 - 0.0112
W, [2017-09-04T10:14:42.080469 ]  WARN -- : DELETE dhcp/:network/:record endpoint has been deprecated and will be removed in future versions. Please use DELETE dhcp/:network/mac/:mac_address or DELETE dhcp/:network/ip/:ip_address instead.
E, [2017-09-04T10:14:42.080758 ] ERROR -- : No DHCP record for 10.xx.xx.0/db:db:db:db:db:db found
I, [2017-09-04T10:14:42.081032 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "DELETE /dhcp/10.xx.xx.0/db:db:db:db:db:db HTTP/1.1" 404 53 0.0008
I, [2017-09-04T10:14:42.181240 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "POST /dhcp/10.xx.xx.0 HTTP/1.1" 200 - 0.0109
W, [2017-09-04T10:14:42.227491 ]  WARN -- : Request to create a conflicting DHCP record
E, [2017-09-04T10:14:42.227953 ] ERROR -- : Record 10.xx.xx.0/10.xx.xx.109 already exists
I, [2017-09-04T10:14:42.228450 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "POST /dhcp/10.xx.xx.0 HTTP/1.1" 409 45 0.0017
W, [2017-09-04T10:14:42.321221 ]  WARN -- : DELETE dhcp/:network/:record endpoint has been deprecated and will be removed in future versions. Please use DELETE dhcp/:network/mac/:mac_address or DELETE dhcp/:network/ip/:ip_address instead.
I, [2017-09-04T10:14:42.331280 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "DELETE /dhcp/10.xx.xx.0/db:db:db:db:db:db HTTP/1.1" 200 - 0.0103
I, [2017-09-04T10:14:42.393623 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "POST /dhcp/10.xx.xx.0 HTTP/1.1" 200 - 0.0109
W, [2017-09-04T10:14:42.444378 ]  WARN -- : Request to create a conflicting DHCP record
E, [2017-09-04T10:14:42.444661 ] ERROR -- : Record 10.xx.xx.0/10.xx.xx.109 already exists
I, [2017-09-04T10:14:42.445000 ]  INFO -- : 10.xx.xx.xx - - [04/Sep/2017 10:14:42] "POST /dhcp/10.xx.xx.0 HTTP/1.1" 409 45 0.0014

Maybe you can help me here. If you need more information just let me know and I provide more logs if necessary.

regards
Sebastian

Actions #1

Updated by Ivan Necas almost 7 years ago

  • Project changed from Foreman Maintain to Foreman
  • Category set to DHCP

Are you able to provision a new host? How was the host provisioned previously? What type of provisioning are you using (bare metal, virt)?

Actions #2

Updated by Sebastian Finke almost 7 years ago

I am able to provision hosts if they are created via Foreman itself. The host was previously provisioned via a different deployment system used in our company. The host got reported to Foreman via Puppet. When hosts got into Foreman via Puppet, and I want to change their status from "unmanaged" to "managed" I receive the error posted in the description.

Actions #3

Updated by Daniel Lobato Garcia almost 7 years ago

Sebastian, how are you getting this error? Is it a 500 page or you're just seeing this on the logs? Normally when there is a conflicting record in the scenario you described, the "Submit" button on the Host form becomes an "Overwrite" button which allows to precisely do that, overwrite the DNS/DHCP entries.

Actions #4

Updated by Sebastian Finke almost 7 years ago

I made some screenshots to show you my process when this error occurs: https://imgur.com/a/wzGfC

Maybe you can have a look and this clarifies some questions.

regards
Sebastian

Actions

Also available in: Atom PDF