Bug 199322 - RFE: perform cleanup in ldap.init
Summary: RFE: perform cleanup in ldap.init
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Safranek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-18 21:19 UTC by Steven Pritchard
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: openldap-servers-2.3.30-2.fc6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-23 12:09:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
ldap.init enhancements (1.75 KB, patch)
2006-07-18 21:19 UTC, Steven Pritchard
no flags Details | Diff

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.


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