Feature #14396
Updated by Dominic Cleal about 9 years ago
Behaviour: In the UI, clicking Import Subnets goes to a page with the Gateway and Netmask correctly detected/filled in, but not the Start/End IPs according to my pool. If I hit the API, I see: root@test1:/var/log/foreman-proxy# wget -q -O - http://localhost:8000/dhcp [{"network":"10.10.0.0","netmask":"255.255.255.0","options":{"routers":["10.10.0.1"]}}] Setup: Debian Wheezy with backports, packaged 1.11 RC3 proxy. Configs: <pre> dhcp.yml --- :enabled: true :use_provider: dhcp_isc </pre> <pre> dhcp_isc.yml --- :config: /etc/dhcp/dhcpd.conf :leases: /var/lib/dhcp/dhcpd.leases :omapi_port: 7911 </pre> <pre> /etc/dhcp/dhcpd.conf omapi-port 7911; default-lease-time 43200; max-lease-time 86400; ddns-update-style none; option domain-name "local.example.net"; option domain-name-servers 10.10.0.1; option ntp-servers none; allow booting; allow bootp; option fqdn.no-client-update on; option fqdn.rcode2 255; option pxegrub code 150 = text ; next-server 10.10.0.1; filename "pxelinux.0"; log-facility local7; include "/etc/dhcp/dhcpd.hosts"; subnet 10.10.0.0 netmask 255.255.255.0 { pool { range 10.10.0.100 10.10.0.200; } option subnet-mask 255.255.255.0; option routers 10.10.0.1; } </pre> Logs: proxy.log D, [2016-03-30T11:44:10.018564 #22508] DEBUG -- : accept: 127.0.0.1:55114 D, [2016-03-30T11:44:10.020127 #22508] DEBUG -- : Rack::Handler::WEBrick is invoked. D, [2016-03-30T11:44:10.020808 #22508] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request D, [2016-03-30T11:44:10.020945 #22508] DEBUG -- : Loading subnets for 127.0.0.1 D, [2016-03-30T11:44:10.020998 #22508] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf D, [2016-03-30T11:44:10.021093 #22508] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts D, [2016-03-30T11:44:10.021233 #22508] DEBUG -- : Added a subnet: 10.10.0.0 I, [2016-03-30T11:44:10.021554 #22508] INFO -- : 127.0.0.1 - - [30/Mar/2016 11:44:10] "GET /dhcp HTTP/1.1" 200 87 0.0010 D, [2016-03-30T11:44:10.022427 #22508] DEBUG -- : close: 127.0.0.1:55114