Bug 207821 - running slapd_db_recover before starting slapd
Summary: running slapd_db_recover before starting slapd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 5
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jan Safranek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-23 22:47 UTC by Bernhard Erdmann
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: openldap-servers-2.3.30-2.fc6
Clone Of:
Environment:
Last Closed: 2007-05-23 12:10:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch for init script to run slapd_db_recover (1.00 KB, patch)
2006-09-23 22:47 UTC, Bernhard Erdmann
no flags Details | Diff
Patch for /etc/init.d/ldap (583 bytes, patch)
2006-10-12 20:34 UTC, John Holmstadt
no flags Details | Diff

Description Bernhard Erdmann 2006-09-23 22:47:01 UTC
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 22:47:01 UTC
Created attachment 137007 [details]
Patch for init script to run slapd_db_recover

Comment 2 John Holmstadt 2006-10-12 16:02:38 UTC
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 20:34:12 UTC
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 12:10:05 UTC
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.