Project

General

Profile

Actions

Bug #12466

closed

Parsing subnets for ISC DHCP fails

Added by Brandon Weeks over 8 years ago. Updated over 5 years ago.

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

Description

https://github.com/theforeman/smart-proxy/commit/e2a21ecff6cf153890e93ad7c28a932396ae02d8#diff-79ebe89624de84cfd48356d119a4b25dR152

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


Related issues 1 (0 open1 closed)

Related to Smart Proxy - Feature #12211: Improve DHCP subnets parsing to get more informations from DHCP serverClosedBaptiste Agasse10/19/2015Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release set to 71
Actions #3

Updated by Baptiste Agasse over 8 years ago

Parsing fail to retrieve subnet infos or just print warnings in logs ?

Actions #4

Updated by Brandon Weeks over 8 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

Actions #5

Updated by Baptiste Agasse over 8 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

Actions #6

Updated by The Foreman Bot over 8 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
Actions #7

Updated by Anonymous over 8 years ago

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

Also available in: Atom PDF