package slapd 2.4.31-1+nmu2ubuntu8.3 failed to install/upgrade: subprocess new pre-installation script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openldap (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Error message while upgrading.
ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: slapd 2.4.31-
ProcVersionSign
Uname: Linux 3.13.0-112-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.23
Architecture: amd64
Date: Fri Mar 17 10:57:23 2017
ErrorMessage: subprocess new pre-installation script returned error exit status 1
InstallationDate: Installed on 2014-05-09 (1042 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
RelatedPackageV
dpkg 1.18.4ubuntu1.1
apt 1.0.1ubuntu2.17
SourcePackage: openldap
Title: package slapd 2.4.31-
UpgradeStatus: Upgraded to trusty on 2017-03-17 (0 days ago)
Hi Rick,
thank you for taking the time to report this bug and helping to make Ubuntu better.
It seems you are upgrading "to" Trusty as version 2.4.31- 1+nmu2ubuntu8. 3 is trusty.
Is that a full precise to trusty Update with slapd formerly configured and working?
In the log I found a few issues, looking at them one by one: 2.4.42+ dfsg-2ubuntu3. 1_amd64. deb ... perl5/Debconf/ Question. pm line 72.
#1
Preparing to unpack .../slapd_
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/
This is "just" an annoying message and fixed later on, see https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 786705. So not a problem.
#2 release- upgrader- 15bkpjew/ imported/ invoke- rc.d: 1: /tmp/ubuntu- release- upgrader- 15bkpjew/ imported/ invoke- rc.d: /sbin/runlevel: not found slapd-2. 4.31-1+ nmu2ubuntu8. 3: slapd.d/ cn=config/ olcDatabase= {1}hdb. ldif" {1}hdb, cn=config: <olcRootPW> can only be set when rootdn is under suffix
/tmp/ubuntu-
* Stopping OpenLDAP slapd
...done.
Dumping to /var/backups/
- directory dc=kavobv, dc=local... 58cbb2fc ldif_read_file: checksum error on "/etc/ldap/
58cbb2fc olcRootPW: value #0: <olcRootPW> can only be set when rootdn is under suffix
58cbb2fc config error processing olcDatabase=
slapcat: bad configuration directory!
failed
That seems to have run into issues while trying to dump the DB to use it on postinst.
To do so it uses slapcat and sets a few opts.
The default is "when needed" and that is then only true if coming from before 2.4.31- 1+nmu2ubuntu5 which we do in your case.
So you can trigger/test that dump manually via: dpkg/info/ slapd.preinst upgrade 2.4.25-1
/var/lib/
Also enabling a set -x in that file gave me a working dump like this: slapd-VERSION backups/ slapd-2. 4.25-1 slapd-2. 4.25-1 slapd-2. 4.25-1 backups/ slapd-2. 4.25-1 slapd-2. 4.25-1: slapd-2. 4.25-1: slapd.d/ cn=config/ olcDatabase= {-1}frontend. ldif /etc/ldap/ slapd.d/ cn=config/ olcDatabase= {0}config. ldif /etc/ldap/ slapd.d/ cn=config/ olcDatabase= {1}hdb. ldif slapd.d/ cn=config/ olcDatabase= {-1}frontend. ldif /etc/ldap/ slapd.d/ cn=config/ olcDatabase= {0}config. ldif /etc/ldap/ slapd.d/ cn=config/ olcDatabase= {1}hdb. ldif slapd.d/ cn=config/ olcDatabase= {-1}frontend. ldif /etc/ldap/ slapd.d/ cn=config/ olcDatabase= {0}config. ldif /etc/ldap/ slapd.d/ cn=config/ olcDatabase= {1}hdb. ldif slapd.d/ cn=config/ olcDatabase= {1}hdb. ldif backups/ slapd-2. 4.25-1/ dc=lxd. ldif
+ echo /var/backups/
+ sed -e s/VERSION/2.4.25-1/
+ dir=/var/
+ mkdir -p -m 700 /var/backups/
+ echo /var/backups/
+ dir=/var/
+ echo Dumping to /var/backups/
Dumping to /var/backups/
+ + read suffix
get_suffix
+ [ -f /etc/ldap/slapd.d ]
+ + cut -d: -fgrep 2
-h olcSuffix /etc/ldap/
+ get_directory dc=lxd
+ [ -d /etc/ldap/slapd.d ]
+ get_suffix
+ [ -f /etc/ldap/slapd.d ]
+ grep -q dc=lxd
+ cut -d: -f 2
+ grep -h olcSuffix /etc/ldap/
+ cut -d: -f 2
+ grep -l olcSuffix: dc=lxd /etc/ldap/
+ sed s/^ *//g
+ grep olcDbDirectory: /etc/ldap/
+ dbdir=/var/lib/ldap
+ [ -n /var/lib/ldap ]
+ [ -d /var/lib/ldap ]
+ file=/var/
+ echo -n - directory dc=lxd...
- directory dc=lxd... + [ -f /etc/ldap/slapd.d ]
+ slapcat_opts=-g -F /etc/ldap/slapd.d
+ slapcat -g -F /etc...