ebox-usersandgroups fails to intialise slapd directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ebox-usersandgroups (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
eBox restarts slapd when new schemas or ACLs are added to /etc/ldap/
invoke-rc.d slapd restart
Right after, it tries to populate the LDAP directory with some entries. The problem is that slapd is not ready to accept connections after invoke-rc.d slapd restart has returned, and eBox throws an exception complaining it couldn't connect to LDAP. It seems that slapd needs some time to get ready to accept connections.
This issue didn't happen neither in last Hardy Beta nor Debian Sarge and it's a showstopper for eBox packages as ebox-samba and ebox-printers modules won't work whatsoever.
To workaround the issue upstream has patched the connection to LDAP within eBox by doing the following:
eBox doesn't give up right away if it can't connect to slapd, and gives some time to slapd to get ready to accept connections. If after a few seconds it can't connect, it finally gives up and throws an exception.
I guess that ideally, slapd should be ready after restarting by not forking until it's ready to accept connections.
Ack from motu-release