Bug #1832
closedThe subnet entry gets duplicated in "addRecord" creating a "No Subnet detected for 10.2.2.010.2.2.0" error
Description
this is using the ISC Server, the log file indicates:
D, [2012-08-20T16:44:58.824812 #12967] DEBUG -- : Lazy loaded 172.28.158.0/255.255.255.128 records
D, [2012-08-20T16:44:58.824867 #12967] DEBUG -- : trying to find an ip address, we got {:from=>"172.28.158.90", :to=>"172.28.158.92", :mac=>"00:50:56:bc:4c:e1"}
D, [2012-08-20T16:44:58.825513 #12967] DEBUG -- : Searching for free ip - pinging 172.28.158.90
D, [2012-08-20T16:45:00.874006 #12967] DEBUG -- : Found free ip 172.28.158.90 out of a total of 3 free ips
D, [2012-08-20T16:45:59.782059 #12967] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2012-08-20T16:45:59.782262 #12967] DEBUG -- : Loading subnets for 127.0.0.1
D, [2012-08-20T16:45:59.782362 #12967] DEBUG -- : Added 172.28.158.0/255.255.255.128 to 127.0.0.1
E, [2012-08-20T16:45:59.782789 #12967] ERROR -- : No Subnet detected for: "172.28.158.0172.28.158.0"
D, [2012-08-20T16:45:59.782850 #12967] DEBUG -- : /app/copa/smart-proxy/lib/proxy/dhcp/server.rb:96:in `addRecord'
/app/copa/smart-proxy/lib/proxy/dhcp/server/isc.rb:26:in `addRecord'
/app/copa/smart-proxy/lib/dhcp_api.rb:95:in `block in <class:SmartProxy>'
rest of traceback is just sinatra
The culprit seems to be:
net = options.delete("network")
subnet = find_subnet(net) || raise(Proxy::DHCP::Error, "No Subnet detected for: #{net.inspect}")
in proxy/dhcp/server.rb
I am trying to figure out where the duplicated/concatenated network is coming from but so far I have not been able to, I am wondering if it is coming from Foreman itself via the RESTful call.
I have a work around for it (a very dirty work around) by using the options[:captures] instead of the options[:networks]
net = options.delete("network")
logger.debug options[:captures].first
subnet = find_subnet(options[:captures].first) || raise(Proxy::DHCP::Error, "No Subnet detected for: #{net.inspect}")
These are both version 1.0 of Foreman and Proxy running on Ruby 1.9.3
Updated by Ohad Levy over 12 years ago
- Status changed from New to Need more information
if you can reproduce this issue, can you paste your config files (lease and conf file)
Updated by Ohad Levy about 12 years ago
Updated by Ohad Levy about 12 years ago
- Status changed from Need more information to Resolved
buttom line, dont use sinatra 1.3.2