Project

General

Profile

Actions

Bug #24978

closed

ISC DHCP parser does not support DDNS entries

Added by Ian Freislich over 5 years ago. Updated over 5 years ago.

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

Description

It appears that the parser is still unable to parse some lease UUIDs. For now I've removed all ddns-dhcids from the leases file and configured 'interim' ddns updates instead of 'standard'.


E, [2018-09-18T12:02:23.452831 ] ERROR -- : Couldn't enable 'dhcp_isc':

in /var/lib/dhcp/dhcpd.leases:409 at 48, expect token [ keyword_server_duid ]
dns-dhcid = "\000\000\001`R\351.\301\365}\214j\027\252\262\337=|\362\\\200\026\26
                                                ^

This is the offending UUID from the leases file:

set ddns-dhcid = "\000\000\001`R\351.\301\365}\214j\027\252\262\337=|\362\\\200\026\264\357\363\033\322\227\274C\253\225t/\314";


Related issues 2 (0 open2 closed)

Related to Smart Proxy - Bug #23433: ISC DHCP new parser my break when parsing lease uidsClosed04/27/2018Actions
Related to Smart Proxy - Bug #23031: ISC DHCP new parser is still unable to parse DUIDClosedActions
Actions #1

Updated by Ian Freislich over 5 years ago

Forgot to mention that I've tried the dhcp smart proxy from 'develop'.

Actions #2

Updated by Ian Freislich over 5 years ago

  • Related to Bug #23433: ISC DHCP new parser my break when parsing lease uids added
Actions #3

Updated by Ian Freislich over 5 years ago

  • Related to Bug #23031: ISC DHCP new parser is still unable to parse DUID added
Actions #4

Updated by Anonymous over 5 years ago

  • Assignee deleted (Anonymous)

Do not assign tickets to people, please.

Actions #5

Updated by Lukas Zapletal over 5 years ago

  • Subject changed from ISC DHCP parser still breaks on lease UUID to ISC DHCP parser does not support DDNS entries

Hello, ddns-dhcid is not lease UUID, these are DDNS statements and they are not supported by the parser.

Paste us full lease declaration here for the future reference please.

Actions #6

Updated by Ian Freislich over 5 years ago

Lukas Zapletal wrote:

Hello, ddns-dhcid is not lease UUID, these are DDNS statements and they are not supported by the parser.

OK. The parser doesn't choke on all the entries though. The following lease parses:


lease 10.20.3.29 {
  starts 5 2018/09/21 14:27:44;
  ends 5 2018/09/21 20:27:44;
  cltt 5 2018/09/21 14:27:44;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 78:84:3c:32:db:75;
  set ddns-dhcid = "\000\000\001V\262\204\326\014x)\340M\255\213?I%\374\025\262\261\245e\\\270\311\340\247\363\250\2473\2452V";
  set ddns-fwd-name = "aquablaze.ags01.trainctrs.trng";
  set ddns-rev-name = "29.3.20.10.in-addr.arpa.";
  client-hostname "aquablaze";
}

Paste us full lease declaration here for the future reference please.

Here's a lease that breaks the parser (the lease following the one above in the file):


lease 10.20.3.24 {
  starts 5 2018/09/21 14:59:32;
  ends 5 2018/09/21 20:59:32;
  cltt 5 2018/09/21 14:59:32;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet f0:1f:af:06:8b:8c;
  set ddns-dhcid = "\000\000\001lcD\232Lq\226J\023R\265\336g?\332D\177h\301 \027\017\010r0\306\235\314a\302}\200";
  set ddns-fwd-name = "lab8-12.ags01.trainctrs.trng";
  set ddns-rev-name = "24.3.20.10.in-addr.arpa.";
  client-hostname "lab8-12";
}
Actions #7

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Pull request https://github.com/theforeman/smart-proxy/pull/609 added
Actions #8

Updated by Ian Freislich over 5 years ago

When I apply the patch from pull request 609, I get the following error starting my proxy:

E, [2018-09-24T10:24:53.973639 ] ERROR -- : Couldn't enable 'dhcp_isc': undefined method `join' for "vendor-class-identifier=\"MSFT 5.0\"":String
D, [2018-09-24T10:24:53.973775 ] DEBUG -- : ["/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:135:in `visit'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:122:in `block in visit'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:122:in `each'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:122:in `visit'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:431:in `block in visit_parse_tree_nodes'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:430:in `each'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:430:in `visit_parse_tree_nodes'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:424:in `start_visiting_parse_tree_nodes'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/configuration_parser.rb:442:in `subnets_hosts_and_leases'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:17:in `load_leases_file'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:156:in `load_leases_file'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:130:in `block in do_start'", "/usr/share/foreman-proxy/modules/dhcp_common/subnet_service.rb:154:in `block in group_changes'", "/usr/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'", "/usr/share/foreman-proxy/modules/dhcp_common/subnet_service.rb:154:in `group_changes'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:128:in `do_start'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:80:in `start'", "/usr/share/foreman-proxy/modules/dhcp_isc/inotify_leases_file_observer.rb:42:in `start'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:238:in `block in start_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:236:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:236:in `start_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:221:in `configure_plugin'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:92:in `block in configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:92:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:92:in `configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `block in initialize_plugins'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `initialize_plugins'", "/usr/share/foreman-proxy/lib/launcher.rb:166:in `launch'", "/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'"]

I think it's choking on this:


lease 10.20.3.28 {
  starts 1 2018/09/24 12:11:53;
  ends 1 2018/09/24 18:11:53;
  cltt 1 2018/09/24 12:11:53;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 54:ab:3a:9b:37:8f;
  uid "\001T\253:\2337\217";
  set ddns-rev-name = "28.3.20.10.in-addr.arpa.";
  set ddns-txt = "3173e9f167e59d464c54d36a2116849bcb";
  set ddns-fwd-name = "LAPTOP-TFQP5BD8.ags01.trainctrs.trng";
  set vendor-class-identifier = "MSFT 5.0";
  client-hostname "LAPTOP-TFQP5BD8";
}
Actions #9

Updated by Lukas Zapletal over 5 years ago

Updated the patch, please let's take this on github.

Actions #10

Updated by Anonymous over 5 years ago

  • Fixed in Releases 1.20.0 added
Actions #11

Updated by Anonymous over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF