Project

General

Profile

Actions

Bug #6311

closed

Deleting a host and re-creating it generates a DHCP error

Added by Alexandre Barth over 10 years ago. Updated over 10 years ago.

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

Description

When i create a new host, everything is ok. But if i delete the host to re-create it (with same name, parameters and ipaddres), the creation fails with the following error :

Create DHCP Settings for dgabrustest.ouest.dga.defense.gouv.fr task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://foreman.test:8443/dhcp

In proxy.log :

E, [2014-06-20T15:14:54.521280 #1384] ERROR -- : Removing a Proxy::DHCP Record which doesn't exist
D, [2014-06-20T15:14:54.521353 #1384] DEBUG -- : /usr/share/foreman-proxy/bin/../lib/proxy/dhcp/subnet.rb:184:in `delete'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:64:in `loadSubnetData'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:55:in `scan'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:55:in `loadSubnetData'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/subnet.rb:65:in `load'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/subnet.rb:75:in `records'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server.rb:78:in `find_record'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server.rb:77:in `each'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server.rb:77:in `find_record'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server.rb:100:in `addRecord'
/usr/share/foreman-proxy/bin/../lib/proxy/dhcp/server/isc.rb:27:in `addRecord'
/usr/share/foreman-proxy/bin/../lib/dhcp_api.rb:94:in `POST /dhcp/:network'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `run'
/usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:42:in `run!'
/usr/share/foreman-proxy/bin/smart-proxy:44


Related issues 1 (0 open1 closed)

Is duplicate of Smart Proxy - Bug #6412: Trying to remove a DHCP record fails due to an invalid subnet checkClosedDavid Swift06/26/2014Actions
Actions #1

Updated by Derek Wright over 10 years ago

I'm running into this same issue. I can create the host after doing a service dhcpd restart.

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Project changed from Foreman to Smart Proxy
  • Category set to DHCP
Actions #3

Updated by Travis Burrell over 10 years ago

I just ran into this same issue. Pastebin here (removed other host info besides offending host). I could also create the host after restarting DHCP (isc-dhcp-server).

Actions #4

Updated by Dominic Cleal over 10 years ago

  • Is duplicate of Bug #6412: Trying to remove a DHCP record fails due to an invalid subnet check added
Actions #5

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Duplicate

Thanks for the reports and stack traces. Looking at them, they appear to be the same as #6412, which has a patch already submitted, so closing this in favour of that ticket.

Actions

Also available in: Atom PDF