Project

General

Profile

Actions

Feature #14396

open

Support for subnet options inside "pool" blocks

Added by Greg Sutcliffe almost 8 years ago. Updated almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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:

dhcp.yml 
---
:enabled: true
:use_provider: dhcp_isc
dhcp_isc.yml 
---
:config: /etc/dhcp/dhcpd.conf
:leases: /var/lib/dhcp/dhcpd.leases
:omapi_port: 7911
/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;
}

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

Related issues 3 (1 open2 closed)

Related to Smart Proxy - Feature #12211: Improve DHCP subnets parsing to get more informations from DHCP serverClosedBaptiste Agasse10/19/2015Actions
Related to Smart Proxy - Refactor #19441: Rewrite isc dhcpd config parser to support various nested blocks Closed05/03/2017Actions
Related to Foreman - Feature #19650: Issue warning when overlapping IP range with lease pool detectedNew05/24/2017Actions
Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Description updated (diff)
Actions #2

Updated by Dominic Cleal almost 8 years ago

  • Related to Feature #12211: Improve DHCP subnets parsing to get more informations from DHCP server added
Actions #3

Updated by Anonymous almost 8 years ago

Not sure if this should be qualified as a bug. "Range" option is supported when it's a child of "subnet". We do not parse the contents of "pool" blocks, however.

Actions #4

Updated by Anonymous almost 8 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from 1.11 import subnets improvements not importing ranges to Support for subnet options inside "pool" blocks

This would most likely require changes on the foreman side as well.

Actions #5

Updated by Greg Sutcliffe almost 8 years ago

Dmitri, ah ok, that certainly explains the behaviour I'm seeing.

I'd suggest making this an RFE then - currently the dhcpd.conf above is what our puppet-dhcp module produces by default. If others use this module to manage their dhcp server (and we do say they can import the installer modules and use them to maintain the installation) then this feature won't work for them. Of course, we could also take patches to puppet-dhcp to solve the problem there instead :)

Actions #6

Updated by Anonymous almost 7 years ago

  • Related to Refactor #19441: Rewrite isc dhcpd config parser to support various nested blocks added
Actions #7

Updated by Lukas Zapletal almost 7 years ago

  • Related to Feature #19650: Issue warning when overlapping IP range with lease pool detected added
Actions

Also available in: Atom PDF