RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 613966 - Init script is working wrong if database recovery is needed
Summary: Init script is working wrong if database recovery is needed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openldap
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Vcelak
QA Contact: Ondrej Moriš
URL:
Whiteboard:
Depends On: 604092 667768
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-13 11:44 UTC by Jan Zeleny
Modified: 2013-03-04 01:27 UTC (History)
6 users (show)

Fixed In Version: openldap-2.4.23-5.el6
Doc Type: Bug Fix
Doc Text:
- OpenLDAP server is terminated uncleanly (e.g. force power off) - slapd configuration test in initscript will fail or stuck in an infinite loop and the server will not start - removed database check from configration test in the initscript - slapd server will start, because it can recover independently from unclean termination
Clone Of: 604092
Environment:
Last Closed: 2011-05-19 13:59:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0673 0 normal SHIPPED_LIVE openldap bug fix and enhancement update 2011-05-18 18:10:44 UTC

Description Jan Zeleny 2010-07-13 11:44:27 UTC
+++ This bug was initially created as a clone of Bug #604092 +++

Description of problem:
The problem is in init script (/etc/rc.d/init.d/ldap)

If recovery is required for bdb backend databases (because of unclean shutdown or other reason), the script prevents automatic recovery on start.

On start (in configtest procedure) it tries to execute "slaptest". If it fails, it won't continue.
If it fails because a bdb recovery is needed, then it is not possible to start slapd from initscipts. The automatic recovery is not performed because "slaptest" implies read-only mode.

The output looks like:

"[root@daisy ldap]# service ldap start
Checking configuration files for slapd:  bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered."

When slapd is then run from command line then it performs automatic recovery and works fine. It is possible then to start slapd from initscripts.

It hit me really hard - the ldap has user and group database and the nss_ldap has very long timeouts, so to be able to get the machine working after crash I had to go in single user mode and fix it by hand.

Version-Release number of selected component (if applicable):
openldap-2.3.43-12.el5


How reproducible:
Always

Steps to Reproduce:
1. Corrupt the openldap bdb files in such fashion that recovery is required and automatic recovery will be able to handle this (it may be tricky :)
2. Try to start openldap: service ldap start
3.
  
Actual results:
The slapd doesn't start, as the initscript fails in earlier stage (at slaptest)

Expected results:
The slapd is started and performs automatic recovery. I think that the "configtest" part of this script should report errors but it shouldn't do an exit in case of failure. The script should try to start the slapd anyway.

Additional info:

--- Additional comment from jzeleny on 2010-07-13 13:43:15 CEST ---

Actually just calling slaptest with -u every time will do the trick. But this is a change of behavior which is not likely to be expected in RHEL-5. It is a good idea to fix it in RHEL-6 though.

Comment 3 Jan Vcelak 2011-01-13 20:41:53 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
- OpenLDAP server is terminated uncleanly (e.g. force power off)
- slapd configuration test in initscript will fail or stuck in an infinite loop and the server will not start
- removed database check from configration test in the initscript
- slapd server will start, because it can recover independently from unclean termination

Comment 6 errata-xmlrpc 2011-05-19 13:59:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0673.html


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