Red Hat Bugzilla – Bug 207821
running slapd_db_recover before starting slapd
Last modified: 2007-11-30 17:11:44 EST
Description of problem:
slapd_db_recover must be run when slapd was not shut down properly
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. power off your server without shutdown
2. power on
3. see /etc/init.d/ldap start
manual recovery is needed, ldap server is unwilling to perform otherwise
automatic recovery should be done by the init script
Created attachment 137007 [details]
Patch for init script to run slapd_db_recover
I don't think that patch will do the job. At least it didn't for me. With
openldap-2.3.19-4, on line 133 in /etc/init.d/ldap, "exit 1" is executed if the
configtest fails, which it will if the DB is corrupt.
I think this patch needs to be placed or called in replacement of "exit 1".
Perhaps then have a second check run to see if the DB has actually been
successfully recovered before attempting to proceed with the startup.
Created attachment 138376 [details]
Patch for /etc/init.d/ldap
This seems to work well for me. I apologize if the coding and/or my logic is
openldap-servers-2.3.30-2.fc6 has improved startup checks and recovery.
db_recover should be part of slapd initialization now.