Bug 1161486

Summary: [y2-dhcp-server] Feature: more informative help and/or error reporting
Product: [openSUSE] openSUSE Distribution Reporter: Aaron Williams <aaron.w2>
Component: YaST2Assignee: YaST Team <yast-internal>
Status: CONFIRMED --- QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: aaron.w2, ancor
Version: Leap 15.1Flags: ancor: needinfo? (aaron.w2)
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://trello.com/c/yKycLq3a
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Aaron Williams 2020-01-22 07:27:00 UTC
I am using the LDAP configuration for DHCP and suddenly I am getting:

Jan 21 23:06:34 roger.doofus.org dhcpd[8268]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=roger.doofus.org))

I am now unable to start DHCP. I have tried restoring my LDAP database from a known working one but still, I cannot get DHCP to start. I have only used Yast to configure the server. I am not an expert on LDAP, but I have made no changes there.

dhcpd -4 -f -t
Internet Systems Consortium DHCP Server 4.3.6-P1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=roger.doofus.org))
Configuration file errors encountered -- exiting

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.


I have no idea what's missing in the LDAP configuration since this is managed by YaST.
Comment 1 Aaron Williams 2020-01-22 08:00:35 UTC
I found the cause.  I only had a secondary static IP address assigned to the DHCP server port. The primary address was obtained using DHCP.
Comment 2 Ancor Gonzalez Sosa 2020-01-22 09:32:27 UTC
(In reply to Aaron Williams from comment #1)
> I found the cause.  I only had a secondary static IP address assigned to the
> DHCP server port. The primary address was obtained using DHCP.

So, is there something to fix in the YaST side or we can close this bug report?
Comment 3 Aaron Williams 2020-01-22 09:40:24 UTC
I think at this point it is more of an enhancement request. Any time something is not correct in the configuration there's just a useless LDAP error which is zero help in tracking down the problem.  The only way to debug it I found was to turn off LDAP and try again.  I spent many hours trying to trace the source of the LDAP error without success (Google was little help).

For example, in one case I put in netmask and it gave the LDAP error (rather than flag the error about the IP address).  In another, I had a duplicate entry on two different subnets.  Just adding this to the help would have saved me a lot of time.