upgrade from slapd from dapper to hardy fails on DB conversion

Bug #218311 reported by Martin Emrich
4
Affects Status Importance Assigned to Milestone
openldap2.3 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I just tried to upgrade a server with openldap from dapper to hardy (I pulled an image from the dapper server and am doing a dry-run in a virtualbox now).

During the upgrade, the slapd postinst script somehow crashed in an intermediate state, and the upgrade aborted shortly after that.

When I try "dpkg --configure slapd" now, I get this:

root@newsauron:/var/lib/ldap# LANG=C dpkg --configure slapd
Setting up slapd (2.4.7-6ubuntu3) ...
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.2.26-5ubuntu2.6... done.
  Upgrading BDB 'checkpoint' options... .
  Moving old database directories to /var/backups:

  Backup path /var/backups/dc=darkzone-2.2.26-5ubuntu2.6.ldapdb exists. Giving up...
dpkg: error processing slapd (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 slapd

After removing the mentioned backup, I get this:
root@newsauron:/var/lib/ldap# LANG=C dpkg --configure slapd
Setting up slapd (2.4.7-6ubuntu3) ...
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.2.26-5ubuntu2.6... done.
  Upgrading BDB 'checkpoint' options... .
  Moving old database directories to /var/backups:
  - directory dc=darkzone... done.
  Loading from /var/backups/slapd-2.2.26-5ubuntu2.6:
  - directory dc=darkzone... failed.

Loading the database from the LDIF dump failed with the following
error while running slapadd:
    /var/backups/slapd-2.2.26-5ubuntu2.6/dc=darkzone.ldif: No such file or directory
dpkg: error processing slapd (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 slapd

When I remove both, I get this:
Setting up slapd (2.4.7-6ubuntu3) ...
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.2.26-5ubuntu2.6... done.
  Upgrading BDB 'checkpoint' options... .
  Moving old database directories to /var/backups:
  Loading from /var/backups/slapd-2.2.26-5ubuntu2.6:
  - directory dc=darkzone... failed.

Loading the database from the LDIF dump failed with the following
error while running slapadd:
    /var/backups/slapd-2.2.26-5ubuntu2.6/dc=darkzone.ldif: No such file or directory
dpkg: error processing slapd (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 slapd

I have pulled an LDIF dump from the (still untouched) original server and rebuilt the database, so my LDAP is up and running again. How can I tell the postinst script that these actions are not necessary?

I have made a snapshot of the VM before starting the upgrade, and I'll investigate what went wrong after the first upgrade dry-run went through.

Ciao

Martin

Revision history for this message
Martin Emrich (emme) wrote :

I analyzed the problem(s), and I found invalid entries in my ldap database which seem to have been added during the installation a long time ago (See also Bug #112631).

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Per user comments, I am marking this as a duplicate of bug 112631. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

Changed in openldap2.3:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.