Bug #17800
closedISC Dhcpd Config Parse Error
Description
After updating from Smart Proxy 9.x -> 12.4 the subnet in my dhcpd.conf was no longer being detected. I checked in on IRC, and witlessb, confirmed it was an issue with the dhcpd parser due to the use of the 'pool' option within the subnet declaration. My 'non-working' dhcpd subnet config is as follows. Removing the conditional (logically useless I know) didn't fix it..., but it's valid dhcpd jargon so I figured I'd leave it in. This worked in the 9.x release of the foreman proxy. I was able to remove the pool declaration from this config, but my other Foreman'd systems have multiple pools with different settings, so I will need this working before I can update them.
# Subnet subnet 10.30.0.0 netmask 255.255.0.0 { default-lease-time 3600; max-lease-time 3600; option routers 10.30.0.1; option subnet-mask 255.255.0.0; option domain-name "ZZZ."; option domain-name-servers 10.30.0.1; option broadcast-address 10.30.255.255; if ((substring (option vendor-class-identifier, 0, 9) = "PXEClient") or (substring (option vendor-class-identifier, 0, 9) = "Etherboot")) { # i386 and x86_64 filename "pxelinux.0"; } else { filename "pxelinux.0"; } pool { range 10.30.0.10 10.30.0.254; option routers 10.30.0.1; option domain-name-servers 10.30.0.1; option subnet-mask 255.255.0.0; option ntp-servers 10.30.0.1; ddns-domain-name = "ZZZ."; } }
Updated by Dominic Cleal over 7 years ago
- Is duplicate of Bug #16079: ISC DHCP subnets fail to parse with host or class stanzas inside added
Updated by Dominic Cleal over 7 years ago
- Status changed from New to Feedback
This file appears to parse since #16079, with the 10.30.0.0 subnet being registered. Can you please re-test on a newer release? This fix is available in 1.14.0-RC1.
Updated by Karl Vollmer over 7 years ago
Hm, doesn't look like anything past 12.4 is available for EL6 (what my systems are) so I guess I'm pooched till I do a full os reload, or is it safe to use the el7 repo on EL6?
Dominic Cleal wrote:
This file appears to parse since #16079, with the 10.30.0.0 subnet being registered. Can you please re-test on a newer release? This fix is available in 1.14.0-RC1.
Updated by Dominic Cleal over 7 years ago
The EL7 packages are only designed for EL7.
Updated by Karl Vollmer over 7 years ago
Hmm.. it's unlikely I'm going to be in a position to update to EL7 anytime soon, removing the pool definition fixes the DHCP subnet issue, but then I hit http://projects.theforeman.org/issues/16475 which seems to be a different blocking bug for 12.4, which doesn't appear to be being fixed? (solution update foreman-proxy is how I read that).
Has El6 been abandoned for both proxy and server going forward, or will it be ported back at some point?
Dominic Cleal wrote:
The EL7 packages are only designed for EL7.
Updated by Lukas Zapletal over 7 years ago
I was thinking a simple workaround - when we include a file, we can skip inclusion of all files with "skip-foreman" string in the filename or directory name, threfore all the bits that are not parseable by proxy could be taken out into subdirectory. Super easy one line patch, we are unlikely rewrite whole ISC DHCP parser, it's regexp based and very limited.
Updated by Lukas Zapletal over 7 years ago
Also here is a trick to check syntax: https://github.com/iNecas/foreman_maintain/issues/46
Updated by The Foreman Bot over 7 years ago
- Status changed from Feedback to Ready For Testing
- Assignee set to Lukas Zapletal
- Pull request https://github.com/theforeman/smart-proxy/pull/517 added
Updated by Anonymous over 7 years ago
I have a new implementation of isc config parser that will parse any valid configuration file. I'll see if I can finish it in the upcoming sprint.
Updated by Dominic Cleal over 7 years ago
Lukas, you appear to have hijacked a closed issue for your change. As discussed above, this already fixed in develop. Please use a new ticket.
Updated by Lukas Zapletal over 7 years ago
- Status changed from Ready For Testing to New
- Assignee deleted (
Lukas Zapletal) - Pull request deleted (
https://github.com/theforeman/smart-proxy/pull/517)
Sorry!
Updated by Lukas Zapletal over 7 years ago
- Related to Feature #19104: Ignore tagged includes for ISC DHCP added
Updated by Anonymous over 7 years ago
- Related to Refactor #19441: Rewrite isc dhcpd config parser to support various nested blocks added