Bug #23031

ISC DHCP new parser is still unable to parse DUID

Added by Lukas Pramuk 4 months ago. Updated 4 days ago.

Status:Closed
Priority:Normal
Assignee:Dmitri Dolguikh
Category:-
Target version:1.18.0
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link: Found in Releases:
Pull request:https://github.com/theforeman/smart-proxy/pull/571

Description

The new parser fails to parse the line in /var/lib/dhcpd/dhcpd.leases:

E, [2018-03-27T00:06:23.726811 ] ERROR -- : Couldn't enable 'dhcp_isc': 
in /var/lib/dhcpd/dhcpd.leases:6 at 1, expect token [ keyword_server_duid ]

 ^
E, [2018-03-27T00:06:23.727078 ] ERROR -- : Disabling all modules in the group ['dhcp_isc', 'dhcp'] due to a failure in one of them: 
in /var/lib/dhcpd/dhcpd.leases:6 at 1, expect token [ keyword_server_duid ]

The "winning" server duid is:

# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.5

server-duid "\000\001\000\001\"L{\010RT\000A\377\305";


(standard unmodified ISC DHCP from RHEL7.4)

foreman-proxy-1.18.0-0.develop.201802282028gitaf41016.el7.noarch
dhcp-4.2.5-58.el7_4.3.x86_64


Related issues

Related to Smart Proxy - Bug #23433: ISC DHCP new parser my break when parsing lease uids Closed 04/27/2018

Associated revisions

Revision aaaa7737
Added by Dmitri Dolguikh 3 months ago

Fixes #23031 - parse server duid's with nested double quotes

History

#1 Updated by Lukas Pramuk 4 months ago

deleted line, restarted dhcpd, got new duid, new and failing:

server-duid "\000\001\000\001\"M\033\317RT\000A\377\305";

#2 Updated by The Foreman Bot 4 months ago

  • Assignee set to Dmitri Dolguikh
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/571 added

#3 Updated by Anonymous 3 months ago

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

#4 Updated by Lukas Zapletal 3 months ago

  • Legacy Backlogs Release (now unused) set to 330

#5 Updated by Dmitri Dolguikh 3 months ago

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

#6 Updated by Jorick Astrego 3 months ago

I've tried the patch in this issue after trying the patch in https://projects.theforeman.org/issues/20826

But I still get the following error on Katello 3.5/foreman 1.16:

E, [2018-05-01T13:50:43.338532 ] ERROR -- : Couldn't enable 'dhcp_isc': 
in /var/lib/dhcpd/dhcpd.leases:6 at 1, expect token [ include_keyword ]

 ^
E, [2018-05-01T13:50:43.338747 ] ERROR -- : Disabling all modules in the group ['dhcp_isc', 'dhcp'] due to a failure in one of them: 
in /var/lib/dhcpd/dhcpd.leases:6 at 1, expect token [ include_keyword ]

But not the keyword_server_duid error I expected:

in /var/lib/dhcpd/dhcpd.leases:6 at 1, expect token [ keyword_server_duid ]

My DUID is:

cat /var/lib/dhcpd/dhcpd.leases# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.5

server-duid "\000\001\000\001\"{\032\342\000\032J\026\001w";

To be sure I also replaced the file with https://github.com/theforeman/smart-proxy/blob/develop/modules/dhcp_common/isc/configuration_parser.rb to no avail. And I'm not able to update foreman as it's tied to Katello.

#7 Updated by Jorick Astrego 3 months ago

Sorry, it's fixed. Did a reboot and after that it worked fine.

#8 Updated by Timo Goebel about 1 month ago

This is actually in 1.17.0, see https://github.com/theforeman/smart-proxy/commit/9de73fb945cc7e12d1d77b0dd0c90e972bafad06.

Could someone please update the release field?

#9 Updated by Anonymous 5 days ago

  • Target version deleted (1.18.0)

Also available in: Atom PDF