Actions
Bug #19634
closedDHCP lease removal leads to error
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
Foreman v1.15.0, Smart Proxy v1.15.0
Attempting to provision a discovered host - which has received a DHCP lease as part of the discovery - fails with the following error;
Unable to save DHCP conflicts removal for machine.example.com task failed with the following error: ERF12-0635 [ProxyAPI::ProxyException]: Unable to delete DHCP entry for 00:24:81:e1:06:27 ([RestClient::BadRequest]: 400 Bad Request)
The smart-proxy log meanwhile shows the failed attempt as the following messages and backtrace;
W, [2017-05-23T14:04:57.684136 ] 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-05-23T14:04:57.684508 ] ERROR -- : 10.236.252.204 / 00:24:81:e1:06:27 is static - unable to delete I, [2017-05-23T14:04:57.685050 ] INFO -- : 10.236.252.20 - - [23/May/2017:14:04:57 +0200] "DELETE /dhcp/10.236.252.0/00:24:81:e1:06:27 HTTP/1.1" 400 64 0.0013
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:19:in `del_record' /usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:114:in `block in <class:DhcpApi>' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `[]' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:in `call' /usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call' /usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call' /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call' /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call' /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call' /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call' /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call' /usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/head.rb:13:in `call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize' /usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call' /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each' /usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call' /usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service' /usr/share/ruby/webrick/httpserver.rb:138:in `service' /usr/share/ruby/webrick/httpserver.rb:94:in `run' /usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
The only data that exists for the host in question is the following lease entry;
lease 10.236.252.204 { starts 2 2017/05/23 08:57:32; ends 2 2017/05/23 20:57:32; cltt 2 2017/05/23 08:57:32; binding state active; next binding state free; rewind binding state free; hardware ethernet 00:24:81:e1:06:27; }
Actions