This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 240834 - Update of openldap-servers package deletes whole database
Update of openldap-servers package deletes whole database
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openldap (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-22 03:23 EDT by Jan Safranek
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0499
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 12:28:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Safranek 2007-05-22 03:23:02 EDT
Description of problem:
Update of openldap-servers package will result in empty database. There is a
backup of the database created by the openldap-servers.rpm, but it must be
manually restored.

Version-Release number of selected component (if applicable):
openldap-servers-2.3.27-5

How reproducible:

Steps to Reproduce:
1. fill your ldap database
2. rpm -Uvh openldap-servers-2.3.27-X where X > 5
3. ldapsearch -x -b "dc=example,dc=com"

Actual results:
the ldap database is empty

Expected results:
the ldap database remains full

Additional info:
There is a bug in openldap.spec - it saves the database to backup in %preun
section and restores it from there in %post. Unfortunately, %post is executed
before %preun, so the database is not restored.

We cannot simply fix %preun for 5.1 release, because it is taken from the old
package openldap-servers-2.3.27-5 (part of RHEL 5.0 release), which is already
installed. I.e. the update from 5.0 to 5.1 will delete the database. We can fix
our release for RHEL 5.1, so any future update (e.g. from 5.1 to 5.2) will be OK.
Comment 1 RHEL Product and Program Management 2007-05-22 03:44:05 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 Jan Safranek 2007-06-22 06:46:16 EDT
Just a note what will happen during update from 5.0 to 5.1:
1. %pre (of NEW version): save backup of the database and delete it (because 
the DB format between releases may change) -
2. %post (of NEW version): restore database from backup 
3. %preun (of OLD version): backup the database and delete it (this is the bug)
4. %posttrans (of NEW version): restore the backup (this is the bugfix)

Result: database is correctly restored from backup, no data are lost. But it 
takes some time, because the database is saved/restored twice.


In following updates (5.1->5.2)
1. & 2. as in prev. update
3. was removed from the spec file
4. does nothing, because 3. was removed

Result: database is correctly restored from backup, no data are lost.


Problems are stil with "update" from 5.0 to 5.0
1. not present in 5.0
2. %post (of NEW version): restore database from backup (but there is no 
backup...)
3. %preun (of OLD version): backup the database and delete it
4. is not is 5.0

Result: database is is empty. It can be restored from backup created in step 3, 
but it requires admin intervention. There is no way how to fix the RPM, which 
was already released to the customers.
Comment 7 errata-xmlrpc 2007-11-07 12:28:44 EST
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 the 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-2007-0499.html

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