[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#3833) back-bdb doesn't start up after manual recovery



Full_Name: Buchan Milne
Version: 2.3.4
OS: Linux (Mandriva 2005LE)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (168.209.98.67)


I have run into a few situations where slapd from 2.3.4 would not start up after
an unclean shutdown.

The init script in use at the time
(http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/contrib-SPECS/openldap2.3/ldap.init?rev=1.1&content-type=text/x-cvsweb-markup),
the current init script in the Mandriva cooker openldap2.3 packages, runs
db_recover for each database at startup.

Removing the call to recover() in start(), and removing the alock files from the
database directories fixed this (allowing slapd to run recovery and start). I
will update the Mandriva package with this change.

However, slapd should either tolerate a manual db_recover, or the documentation
should be updated to note that running db_recover is now harmful (whereas
previously it was recommended).

Some quotes from #ldap on irc.freenode.net:
<hyc> have you already filed an ITS for this? I think in the case when recovery
has already been performed, we should let it silently succeed here.
<hyc> hm. have to think about that some more.
<hyc> there are two different situations here. The first is that auto-recovery
should not fail.
<hyc> the second is that restarting after a manual recovery should succeed. The
manual recovery deletes the environment. back-bdb tries to open it, gets an
ENOENT, and complains.
<_ranger_> ah, ok, I still have a "manual" db_recover in the init script
<hyc> ohh.... get rid of that.
<_ranger_> I'll remove it now, re-import my ldif's and see if I can reproduce
<hyc> in the meantime, since the environment has been deleted, you will have to
manually delete the alock file to get slapd to startup
<hyc> or you can just start from scratch like you just said.
<_ranger_> ah, ok, was wondering what the new file in the db dir was ...
[...]
<_ranger_> hyc, ok, that seems to have fixed it
<_ranger_> (not running db_recover in the init script)
<hyc> cool
<_ranger_> I'll file an ITS then on back-bdb starting up after manual
db_recovery?
<hyc> We need to document that somewhere. Not sure where. Probably the Admin
Guide.
<_ranger_> ok, so a bug on documentation then?
<hyc> yeah, I think so. We don't want people to run manual db_recover any more.