#774316 fails to upgrade to jessie with "cannot add entry with empty dn"

Package:
slapd
Source:
openldap
Description:
OpenLDAP server (slapd)
Submitter:
Antoine Beaupré
Date:
2015-01-29 17:00:11 UTC
Severity:
normal
#774316#5
Date:
2014-12-30 23:08:40 UTC
From:
To:
This package cannot be upgaded to jessie:

Paramétrage de slapd (2.4.40-3) ...
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.31-1+nmu2... done.
  Moving old database directories to /var/backups:
  Loading from /var/backups/slapd-2.4.31-1+nmu2:
  - directory dc=koumbit,dc=org... failed.

Loading the database from the LDIF dump failed with the following
error while running slapadd:
    slapadd: line 1: cannot add entry with empty dn=""
dpkg: erreur de traitement du paquet slapd (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1

I don't believe I had anything fancy going on here.

#774316#10
Date:
2014-12-31 17:27:22 UTC
From:
To:
Hi,

Thanks for the report.

At first glance this sounds like an invalid configuration. Assuming the
messages are accurate, slapadd is correct in refusing to add entries
that are outside of the configured suffix. Basically I expect this to be
a duplicate of #546368. Do you think that's correct?

The good news is, if that's the case, then if you edit
/var/backups/slapd-2.4.31-1+nmu2/dc=koumbit,dc=org.ldif and remove the
offending entries, retrying the upgrade with 'apt-get -f install' should
succeed.

thanks,
Ryan

#774316#17
Date:
2015-01-17 16:13:37 UTC
From:
To:
severity 774316 important
tag 774316 + unreproducible
thanks

Newly installed wheezy VM (7.8), slapd installed, minimal LDAP database
with a few minor records added.

Sources updated to jessie, upgrade, dist-upgrade:

Installing new version of config file /etc/ldap/schema/ppolicy.schema ...
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.31-1+nmu2... done.
  Moving old database directories to /var/backups:
  - directory dc=nodomain... done.
  Loading from /var/backups/slapd-2.4.31-1+nmu2:
  - directory dc=nodomain... done.
  - chowning database directory (openldap:openldap)... done
Starting OpenLDAP: slapd.

The package upgraded just fine.

# dpkg -l slapd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name               Version        Architecture   Description
+++-==================-==============-==============-==========================================
ii  slapd              2.4.40-3       amd64          OpenLDAP server (slapd)

This does look like an invalid configuration.

#774316#26
Date:
2015-01-29 16:53:40 UTC
From:
To:
Hi,

I didn't see a response to this, so I'm merging this with the existing
report about the upgrade behaviour in such a scenario. Of course, feel
free to undo it if it turns out I'm wrong.

thanks
Ryan