Bug 668276 - dhcp-ldap config load problem
Summary: dhcp-ldap config load problem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 14
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-09 17:21 UTC by Razvan
Modified: 2011-01-25 21:00 UTC (History)
1 user (show)

Fixed In Version: dhcp-4.2.0-18.P2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-25 21:00:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Razvan 2011-01-09 17:21:51 UTC
Description of problem:
DHCP LDAP is not loading the configurations. The LDAP_CONFIGURATION is not defined.

Version-Release number of selected component (if applicable):
4.2.0-P2

How reproducible:
Use LDAP for storing configuration and it will fail, every time.

Additional info:
- workaround: in includes/dhcpd.h add
    #ifndef LDAP_CONFIGURATION
    #define LDAP_CONFIGURATION
    #endif

Comment 1 Jiri Popelka 2011-01-10 17:13:51 UTC
We are passing -DLDAP_CONFIGURATION to the compiler when compiling dhcp, which is the equivalent of putting #define LDAP_CONFIGURATION at the top of dhcpd.h.
You can see it in build.log (e.g. https://koji.fedoraproject.org/koji/getfile?taskID=2698608&name=build.log)

Had you tried to build and use dhcp with your suggested workaroung ?

Comment 2 Jiri Popelka 2011-01-10 17:43:39 UTC
But there's
#if !defined(LDAP_CONFIGURATION)
		c = EOF;
#else /* defined(LDAP_CONFIGURATION) */
		if (cfile->read_function != NULL)
			c = cfile->read_function(cfile);
		else
			c = EOF;
#endif

in common/conflex.c and that file hadn't been compiled with LDAP_CONFIGURATION defined.

Please try this scratch-build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2712735

Comment 3 Razvan 2011-01-10 18:21:15 UTC
That flag isn't passed to the compiler. It should be, but it isn't. 

The workaround is the thing that keeps my server on. I have upgraded from F13
to F14 and the DHCP server refused to start up saying that is missing some
configuration so I've downloaded the sources (yumdownloader --source dhcp) and
diff this sources with the sources from F13. From that diff I've seen this:

-               if (cfile -> read_function) {
-                       c = cfile -> read_function (cfile);
-               } else {
+#if !defined(LDAP_CONFIGURATION)
+               c = EOF;
+#else /* defined(LDAP_CONFIGURATION) */
+               if (cfile->read_function != NULL)
+                       c = cfile->read_function(cfile);
+               else

EOF was the returned code so I've put a fprintf(stderr, "HERE\n") in the #if
!defined(LDAP_CONFIGURATION), which was printed.

This is the short story. The workaround was the quick fix for the problem (I do
have a backup DHCP which is still on F13, but I don't like not to have backup).

Comment 4 Razvan 2011-01-10 19:43:04 UTC
Apparently the scratch-build works.
Thank you.

Comment 5 Fedora Update System 2011-01-20 14:34:04 UTC
dhcp-4.2.0-18.P2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/dhcp-4.2.0-18.P2.fc14

Comment 6 Fedora Update System 2011-01-20 19:56:15 UTC
dhcp-4.2.0-18.P2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dhcp'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/dhcp-4.2.0-18.P2.fc14

Comment 7 Fedora Update System 2011-01-25 21:00:04 UTC
dhcp-4.2.0-18.P2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.