Bug #16079

ISC DHCP subnets fail to parse with host or class stanzas inside

Added by alvin starr 6 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Lukas Zapletal
Category:DHCP
Target version:Foreman - Team Daniel - iteration 6
Difficulty: Bugzilla link:1393914
Found in release:1.11.4 Pull request:https://github.com/theforeman/smart-proxy/pull/474
Story points-
Velocity based estimate-
Release1.14.0Release relationshipAuto

Description

I have a subnet definition
subnet 10.253.2.0 netmask 255.255.255.0 {
stuff
}

If I add a host definition to the subnet like

subnet 10.253.2.0 netmask 255.255.255.0 {
stuff
host puter {
       server-name "puter";
       hardware ethernet 00:18:dd:01:9e:2e;
       fixed-address 10.253.2.127;
       }

}

the subnet does not get recoginzed.
If I add in the subnet stanza something like

     class "pxeclients" {
          match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
          if option pxe-system-type = 00:02 {
                  filename "ia64/elilo.efi";
          } else if option pxe-system-type = 00:06 {
                  filename "grub/grub-x86.efi";
          } else if option pxe-system-type = 00:07 {
                  filename "grub/grub-x86_64.efi";
          } else {
                  filename "pxelinux.0";
          }
     }

the same thing happens.
If I extract the static hosts into dhcpd.hosts and include it then things are ok.


Related issues

Related to Smart Proxy - Feature #12211: Improve DHCP subnets parsing to get more informations fro... Closed 10/19/2015
Related to Smart Proxy - Bug #14808: Foreman-Proxy DHCP class doesn't properly read subnets co... Duplicate 04/26/2016
Duplicated by Smart Proxy - Bug #17800: ISC Dhcpd Config Parse Error Feedback 12/20/2016

Associated revisions

Revision 7f016eca
Added by Lukas Zapletal 3 months ago

Fixes #16079 - subnet recursive parsing

History

#1 Updated by Michael Moll 6 months ago

  • Project changed from Foreman to Smart Proxy
  • Category changed from DHCP to DHCP

#2 Updated by Dominic Cleal 6 months ago

  • Subject changed from dhcp proxy parsing problem. to ISC DHCP subnets fail to parse with host or class stanzas inside
  • Description updated (diff)

#3 Updated by Tomer Brisker 3 months ago

  • Bugzilla link set to 1393914

#4 Updated by Lukas Zapletal 3 months ago

Regression introduced by #12211

#5 Updated by Lukas Zapletal 3 months ago

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

#6 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Lukas Zapletal
  • Pull request https://github.com/theforeman/smart-proxy/pull/474 added

#7 Updated by Daniel Lobato Garcia 3 months ago

  • Target version set to Team Daniel - iteration 6

#8 Updated by Anonymous 3 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#9 Updated by Dominic Cleal 3 months ago

  • Release set to 1.14.0

#10 Updated by Dmitri Dolguikh 3 months ago

  • Related to Bug #14808: Foreman-Proxy DHCP class doesn't properly read subnets containing if statements added

#11 Updated by Dominic Cleal 2 months ago

  • Duplicated by Bug #17800: ISC Dhcpd Config Parse Error added

Also available in: Atom PDF