Bug 199322 - RFE: perform cleanup in ldap.init
RFE: perform cleanup in ldap.init
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-18 17:19 EDT by Steven Pritchard
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
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 08:09:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Steven Pritchard 2006-07-18 17:19:38 EDT
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 17:19:38 EDT
Created attachment 132623 [details]
ldap.init enhancements
Comment 2 Jan Safranek 2007-05-23 08:09:00 EDT
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 10:40:59 EDT
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 03:06:50 EDT
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.