Bug 199322

Summary: RFE: perform cleanup in ldap.init
Product: [Fedora] Fedora Reporter: Steven Pritchard <steve>
Component: openldapAssignee: Jan Safranek <jsafrane>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dan.fleischer
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openldap-servers-2.3.30-2.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-23 12:09:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ldap.init enhancements none

Description Steven Pritchard 2006-07-18 21:19:38 UTC
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.

Comment 1 Steven Pritchard 2006-07-18 21:19:38 UTC
Created attachment 132623 [details]
ldap.init enhancements

Comment 2 Jan Safranek 2007-05-23 12:09:00 UTC
openldap-servers-2.3.30-2.fc6 has improved startup checks and recovery.
db_recover should be part of slapd initialization now.

Comment 3 Steven Pritchard 2007-05-23 14:40:59 UTC
I don't see anything about db_recover in the init script.  Is this something 
slapd does internally?

Comment 4 Jan Safranek 2007-05-24 07:06:50 UTC
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.