Bug 207821 - running slapd_db_recover before starting slapd
running slapd_db_recover before starting slapd
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
5
All Linux
medium Severity high
: ---
: ---
Assigned To: Jan Safranek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-23 18:47 EDT by Bernhard Erdmann
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:10:05 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)
Patch for init script to run slapd_db_recover (1.00 KB, patch)
2006-09-23 18:47 EDT, Bernhard Erdmann
no flags Details | Diff
Patch for /etc/init.d/ldap (583 bytes, patch)
2006-10-12 16:34 EDT, John Holmstadt
no flags Details | Diff

  None (edit)
Description Bernhard Erdmann 2006-09-23 18:47:01 EDT
Description of problem:
slapd_db_recover must be run when slapd was not shut down properly

Version-Release number of selected component (if applicable):
openldap-servers-2.3.19-4

How reproducible:
always

Steps to Reproduce:
1. power off your server without shutdown
2. power on
3. see /etc/init.d/ldap start
  
Actual results:
manual recovery is needed, ldap server is unwilling to perform otherwise

Expected results:
automatic recovery should be done by the init script

Additional info:
Comment 1 Bernhard Erdmann 2006-09-23 18:47:01 EDT
Created attachment 137007 [details]
Patch for init script to run slapd_db_recover
Comment 2 John Holmstadt 2006-10-12 12:02:38 EDT
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.
Comment 3 John Holmstadt 2006-10-12 16:34:12 EDT
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
crap.
Comment 4 Jan Safranek 2007-05-23 08:10:05 EDT
openldap-servers-2.3.30-2.fc6 has improved startup checks and recovery.
db_recover should be part of slapd initialization now.

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