Bug #12466
closedParsing subnets for ISC DHCP fails
Description
This commit seems to have caused a regression. This error is seen when running `smart-proxy` in the foreground.
/usr/share/foreman-proxy/modules/dhcp/providers/server/isc.rb:152: warning: regexp has invalid interval
/usr/share/foreman-proxy/modules/dhcp/providers/server/isc.rb:152: warning: regexp has `}' without escape
Updated by Dominic Cleal almost 9 years ago
- Related to Feature #12211: Improve DHCP subnets parsing to get more informations from DHCP server added
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 71
Updated by Baptiste Agasse almost 9 years ago
Parsing fail to retrieve subnet infos or just print warnings in logs ?
Updated by Brandon Weeks almost 9 years ago
Sorry I should have been more clear, it no longer find any subnets.
Nightly:
D, [2015-11-13T04:39:25.710406 #10145] DEBUG -- : verifying remote client
D, [2015-11-13T04:39:25.715928 #10145] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2015-11-13T04:39:25.716226 #10145] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2015-11-13T04:39:25.716522 #10145] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases
D, [2015-11-13T04:39:25.716793 #10145] DEBUG -- : Loading subnets for 127.0.0.1
E, [2015-11-13T04:39:25.717411 #10145] ERROR -- : Subnet 192.168.132.0 not found
I, [2015-11-13T04:39:25.717570 #10145] INFO -- : 192.168.18.41 - - [13/Nov/2015 04:39:25] "GET /192.168.132.0/192.168.132.85 HTTP/1.1" 404 30 0.0073
1.10RC2:
D, [2015-11-13T05:21:57.231388 #27949] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2015-11-13T05:21:57.231519 #27949] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2015-11-13T05:21:57.231679 #27949] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases
D, [2015-11-13T05:21:57.231919 #27949] DEBUG -- : Loading subnets for 127.0.0.1
D, [2015-11-13T05:21:57.232025 #27949] DEBUG -- : Added a subnet: 192.168.129.0
D, [2015-11-13T05:21:57.232197 #27949] DEBUG -- : Added a subnet: 192.168.132.0
D, [2015-11-13T05:21:57.232458 #27949] DEBUG -- : Added a subnet: 172.23.104.0
D, [2015-11-13T05:21:57.232812 #27949] DEBUG -- : Added a subnet: 172.23.106.0
Updated by Baptiste Agasse almost 9 years ago
Brandon, can you please apply the patch bellow:
diff --git a/modules/dhcp/providers/server/isc.rb b/modules/dhcp/providers/server/isc.rb index 8f13fb3..c1dd08f 100644 --- a/modules/dhcp/providers/server/isc.rb +++ b/modules/dhcp/providers/server/isc.rb @@ -149,7 +149,7 @@ module Proxy::DHCP def parse_config_for_subnets ret_val = [] # Extract subnets config block - @config.scan(/subnet\s+([\d\.]+)\s+netmask\s+([\d\.]+)\s*{([\w|;|\.|,|\-|\s]*)}/) do |match| + @config.scan(/subnet\s+([\d\.]+)\s+netmask\s+([\d\.]+)\s*\{([\w|;|\.|,|\-|\s]*)\}/) do |match| network, netmask, subnet_config_lines = match options = {} if subnet_config_lines
Updated by The Foreman Bot almost 9 years ago
- Status changed from New to Ready For Testing
- Assignee set to Anonymous
- Pull request https://github.com/theforeman/smart-proxy/pull/340 added
Updated by Anonymous almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 2f513ecd306e97f29024d5457c1f0692b99ad0a9.