Unable to add host via DHCP

Hello, I am unable to add a host on my new Katello system. I receive the following error:

Create DHCP Settings for myserver1.example.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy http://dhcp01.example.com:8443/dhcp

I am running Katello 3.7 and the Foreman proxy on a Windows DHCP server. I can retrieve an IP address just fine. However, when I finalize a new host I receive that error up above. On the Foreman proxy, I get the following error:

D, [2018-08-09T18:48:22.709689 #13384] DEBUG -- : Lazy loaded 10.120.0.0/255.255.255.0 records
D, [2018-08-09T18:48:22.709689 #13384] DEBUG -- : Added myserver1.example.com (10.90.56.166 / 00:0a:f7:dd:11:42) to 10.90.56.0/255.255.255.0
D, [2018-08-09T18:48:22.709689 #13384] DEBUG -- : executing: c:\windows\sysnative\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server 127.0.0.1 scope 10.90.56.0 add reservedip 10.90.56.166 000af7dd1142 myserver1.example.com
I, [2018-08-09T18:48:22.772187 #13384]  INFO -- : Added DHCP reservation for myserver1.example.com (10.90.56.166 / 00:0a:f7:dd:11:42)
D, [2018-08-09T18:48:22.772187 #13384] DEBUG -- : key: :hostname
D, [2018-08-09T18:48:22.772187 #13384] DEBUG -- : executing: c:\windows\sysnative\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server 127.0.0.1 scope 10.90.56.0 set reservedoptionvalue 10.90.56.166 12 String "myserver1.example.com"
D, [2018-08-09T18:48:22.850310 #13384] DEBUG -- : key: "nextServer"
D, [2018-08-09T18:48:22.850310 #13384] DEBUG -- : executing: c:\windows\sysnative\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server 127.0.0.1 scope 10.90.56.0 set reservedoptionvalue 10.90.56.166 66 String "10.90.4.100"
D, [2018-08-09T18:48:22.912817 #13384] DEBUG -- : key: "related_macs"
E, [2018-08-09T18:48:22.912817 #13384] ERROR -- : undefined method `[]' for nil:NilClass
D, [2018-08-09T18:48:22.912817 #13384] DEBUG -- : C:/SmartProxy/modules/dhcp/providers/server/native_ms.rb:57:in `addRecord'
C:/SmartProxy/modules/dhcp/providers/server/native_ms.rb:44:in `each'
C:/SmartProxy/modules/dhcp/providers/server/native_ms.rb:44:in `addRecord'
C:/SmartProxy/modules/dhcp/dhcp_api.rb:96:in `POST /: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/commonlogger.rb:18:in `call'
C:/SmartProxy/lib/proxy/log.rb:35: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/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/urlmap.rb:47:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/urlmap.rb:41:in `each'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/urlmap.rb:41:in `call'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/builder.rb:77: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'
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.0/lib/rack/server.rb:213:in `start'
C:/SmartProxy/lib/smart_proxy.rb:138:in `launch'
C:/SmartProxy/lib/smart_proxy.rb:138:in `initialize'
C:/SmartProxy/lib/smart_proxy.rb:138:in `new'
C:/SmartProxy/lib/smart_proxy.rb:138:in `launch'
./smart-proxy:6
10.90.4.100 - - [09/Aug/2018 18:48:22] "POST /10.90.56.0 HTTP/1.1" 400 38 11.2813
katello.example.com - - [09/Aug/2018:18:48:11 Coordinated Universal Time] "POST /dhcp/10.90.56.0 HTTP/1.1"
 400 38
- -> /dhcp/10.90.56.0

Any idea what this could be from, or how I can resolve this? Thanks.

Hello,

your smart proxy version is no longer compatible with Foreman you are running. This change added new flag related_macs and it seems to break MS DHCP provider: Feature #17533: Using a bonded interface as provision interface should provision DHCP for all child macs as well - Foreman

Upgrade your smart-proxy to the last stable version or the version that katello 3.7 ships with.

That worked. Thank you.