Actions
Bug #1154
closedms dhcp smart proxy error 400
Description
Hi,
I still have the 400 error when creating a new host in foreman. I have installed the latest available smart proxy version using git and there is also something happening on the ms dhcp server when creating the host. It successfully adds the dhcp reservation but in the foreman gui I get failed 400 Bad Request. I attached the trace from the proxy.log.
# Logfile created on Tue Sep 06 21:55:52 +0200 2011 by logger.rb/1.2.6 D, [2011-09-06T21:55:52.067293 #2864] DEBUG -- : Loading subnets for 172.28.4.12 I, [2011-09-06T21:55:52.613293 #2864] INFO -- : Enumerated the scopes on 172.28.4.12 D, [2011-09-06T21:55:52.613293 #2864] DEBUG -- : Added 172.28.4.0/255.255.252.0 to 172.28.4.12 D, [2011-09-06T21:55:52.613293 #2864] DEBUG -- : Added 172.28.8.0/255.255.252.0 to 172.28.4.12 D, [2011-09-06T21:55:52.613293 #2864] DEBUG -- : Added 172.28.16.0/255.255.252.0 to 172.28.4.12 D, [2011-09-06T21:55:52.613293 #2864] DEBUG -- : Loading subnet data for 172.28.4.0/255.255.252.0 I, [2011-09-06T21:55:53.190493 #2864] INFO -- : Enumerated hosts on 172.28.4.0 D, [2011-09-06T21:55:53.190493 #2864] DEBUG -- : Lazy loaded 172.28.4.0/255.255.252.0 records D, [2011-09-06T21:55:53.190493 #2864] DEBUG -- : Loading subnet data for 172.28.8.0/255.255.252.0 I, [2011-09-06T21:55:53.767693 #2864] INFO -- : Enumerated hosts on 172.28.8.0 W, [2011-09-06T21:55:53.767693 #2864] WARN -- : Skipped 172.28.11.128 - 00-21-70-d4-ca-30- - wrong number of arguments (3 for 1) D, [2011-09-06T21:55:53.767693 #2864] DEBUG -- : Lazy loaded 172.28.8.0/255.255.252.0 records D, [2011-09-06T21:55:53.767693 #2864] DEBUG -- : Loading subnet data for 172.28.16.0/255.255.252.0 I, [2011-09-06T21:55:54.360493 #2864] INFO -- : Enumerated hosts on 172.28.16.0 D, [2011-09-06T21:55:54.360493 #2864] DEBUG -- : Lazy loaded 172.28.16.0/255.255.252.0 records D, [2011-09-06T21:55:54.360493 #2864] DEBUG -- : Added test123.a.space.corp (172.28.16.2 / 00:50:56:b7:00:6d) to 172.28.16.0/255.255.252.0 I, [2011-09-06T21:55:54.984493 #2864] INFO -- : Added DHCP reservation for test123.a.space.corp (172.28.16.2 / 00:50:56:b7:00:6d) E, [2011-09-06T21:55:54.984493 #2864] ERROR -- : undefined method `[]' for nil:NilClass D, [2011-09-06T21:55:54.984493 #2864] DEBUG -- : ./../lib/proxy/dhcp/server/native_ms.rb:50:in `addRecord' ./../lib/proxy/dhcp/server/native_ms.rb:39:in `each' ./../lib/proxy/dhcp/server/native_ms.rb:39:in `addRecord' ./../lib/dhcp_api.rb:91:in `POST /dhcp/:network' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1032:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1032:in `compile!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:620:in `instance_eval' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:620:in `route_eval' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:604:in `route!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:656:in `process_route' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:653:in `catch' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:653:in `process_route' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:603:in `route!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:602:in `each' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:602:in `route!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:741:in `dispatch!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:530:in `call!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `instance_eval' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `invoke' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `catch' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `invoke' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:530:in `call!' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:516:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/methodoverride.rb:24:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/showexceptions.rb:24:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/commonlogger.rb:18:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1168:in `synchronize' C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/content_length.rb:13:in `call' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/handler/webrick.rb:52:in `service' C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start' C:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start' C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/handler/webrick.rb:13:in `run' ./../lib/sinatra-patch.rb:32:in `run!' smart-proxy:102
Actions