Bug 21091

Summary: openldap changes db format between 6.2 and 7.0
Product: [Retired] Red Hat Linux Reporter: Need Real Name <robertk>
Component: openldapAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-20 21:34:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-11-19 18:00:53 UTC
I just upgraded my server from RH6.2 to RH7.  Everything worked great
except that the ldap server stopped working.  After a bunch of checking I
figured out that slapd for RH6.2 reads/writes the directory databases in
"db2" format while RH7 reads/writes them in "gdbm" format.  This may be due
to the makefile being configured with different "--with-ldmb-api=" options
but I didn't check that.

Workarounds:
- I ended up uninstalling ldap, reinstalling the binary from 6.2, dumping
the database in ldif (text) form with ldbmcat, reinstalling the binaries
from 7.0, and importing the directory data with ldapadd.
- An easier fix (once you know what the problem is) is probably to just
recompile the new openldap rpm with the "--with-ldbm-api=db2"

Solution:
- At a minimum you need to add the file /etc/openldap/README.rpm that
describes what is going on.
- Better would be to discuss the issue in the ldap chapter that is included
with the RH docs.
- Best is to convert the database from db2 to gdbm (with backups) during
the rpm upgrade.

Comment 1 Nalin Dahyabhai 2000-11-20 21:34:48 UTC
Converting during an upgrade is out of the question due to uncertainties about
the amount of available disk space.  The on-disk format was changed to gdbm to
insulate the package from incompatible formats being used by multiple versions
of DB.

This isn't going to get any better because the format for the data stored by
OpenLDAP will change between 1.2 and 2.0, though the openldap12 compatibility
package will include the ldbmcat utility from 1.2 to ease the transition, and a
note will be added to the release notes for the next release about this.  I will
add a note to the package just in case it doesn't get added elsewhere and close
this bug when I do it.

Comment 2 Nalin Dahyabhai 2000-11-21 01:10:35 UTC
Documentation on the upgrade procedures has been added to openldap-2.0.7-2,
which will land in Raw Hide when it is next updated.