Red Hat Bugzilla – Bug 199322
RFE: perform cleanup in ldap.init
Last modified: 2007-11-30 17:11:38 EST
After a crash, ldap startup will usually fail due to one or more of these issues:
* Incorrect permissions on /var/lib/ldap/* (already partially detected on startup).
* Corrupt database (usually fixed with db_recover).
* Indexing issues (fixed with slapindex).
I'm attaching a completely untested patch that should add a "clean" argument to
ldap.init that will run db_recover and slapindex. I'd argue that this should
happen during startup (possibly as a configurable thing).
The patch should also catch when /var/lib/__db.* aren't owned by the ldap user.
Created attachment 132623 [details]
openldap-servers-2.3.30-2.fc6 has improved startup checks and recovery.
db_recover should be part of slapd initialization now.
I don't see anything about db_recover in the init script. Is this something
slapd does internally?
Yes, slapd has ability to recover itself (at least with bdb backend). Of course,
it will not recover from every possible error state, neither does db_recover.