[Pkg-openldap-devel] Bug#595672: Upgrading slapd from 2.4.17-2.1 to 2.4.23-4 can fail due to database issues

Jamie Thompson bugs.debian at jamie-thompson.co.uk
Sun Sep 5 17:02:23 UTC 2010


Package: slapd
Version: 2.4.23-4
Severity: important


I just upgraded slapd, and was left with a broken installation (until I fixed it manually that is).

Here's the output:
> Setting up slapd (2.4.23-4) ...
> Installing new version of config file /etc/ldap/schema/openldap.ldif ...
> Installing new version of config file /etc/ldap/schema/nis.ldif ...
> Installing new version of config file /etc/ldap/schema/dyngroup.schema ...
> Installing new version of config file /etc/ldap/schema/misc.schema ...
> Installing new version of config file /etc/ldap/schema/nis.schema ...
> Installing new version of config file /etc/ldap/schema/README ...
> Installing new version of config file /etc/ldap/schema/pmi.schema ...
> Installing new version of config file /etc/ldap/schema/inetorgperson.ldif ...
> Installing new version of config file /etc/ldap/schema/openldap.schema ...
> Installing new version of config file /etc/ldap/schema/inetorgperson.schema ...
> Installing new version of config file /etc/ldap/schema/cosine.ldif ...
> Installing new version of config file /etc/ldap/schema/duaconf.schema ...
> Installing new version of config file /etc/init.d/slapd ...
> Installing new version of config file /etc/default/slapd ...
>   Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.4.17-2.1... done.
>   Moving old database directories to /var/backups:
>   Loading from /var/backups/slapd-2.4.17-2.1:
>   Migrating slapd.conf to slapd.d configuration style... failed.
> 
> Migrating slapd.conf file (/etc/ldap/slapd.conf) to slapd.d failed with the following
> error while running slaptest:
>     bdb(dc=.): Program version 4.8 doesn't match environment version 4.7
>     hdb_db_open: database "dc=." cannot be opened, err -30971. Restore from backup!
>     backend_startup_one (type=hdb, suffix="dc=."): bi_db_open failed! (-30971)
>     slap_startup failed (test would succeed using the -u switch)
> dpkg: error processing slapd (--configure):
>  subprocess installed post-installation script returned error exit status 1

My first line of enquiry was to fix the files and upgrade them manually. I made a backup and
tried running...
> db4.7_checkpoint -1
...on the directory. It informed me that the file log.0000000026 had an invalid version (16?),
and that I shoudl run databse recovery. Which I was already doing, but go figure. I then ran
db4.7_recover on the directory, and got the same message.

I don't update my diretory with mission-critical entries very often (normal updates are just
DHCP-invoked updates, mainly), so I tried deleting the problematic log file and trying again,
and was successful this time. I then restarted the slapd upgrade (via apt-get install), and
the process completed successfully.

I still have the backups of my ldap directory if that helps.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages slapd depends on:
ii  adduser                   3.112          add and remove users and groups
ii  coreutils                 8.5-1          GNU core utilities
ii  debconf [debconf-2.0]     1.5.35         Debian configuration management sy
ii  libc6                     2.11.2-2       Embedded GNU C Library: Shared lib
ii  libdb4.8                  4.8.30-2       Berkeley v4.8 Database Libraries [
ii  libgnutls26               2.8.6-1        the GNU TLS library - runtime libr
ii  libldap-2.4-2             2.4.23-4       OpenLDAP libraries
ii  libltdl7                  2.2.6b-2       A system independent dlopen wrappe
ii  libperl5.10               5.10.1-14      shared Perl library
ii  libsasl2-2                2.1.23.dfsg1-5 Cyrus SASL - authentication abstra
ii  libslp1                   1.2.1-7.7      OpenSLP libraries
ii  libwrap0                  7.6.q-19       Wietse Venema's TCP wrappers libra
ii  lsb-base                  3.2-23.1       Linux Standard Base 3.2 init scrip
ii  perl [libmime-base64-perl 5.10.1-14      Larry Wall's Practical Extraction 
ii  psmisc                    22.11-1        utilities that use the proc file s
ii  unixodbc                  2.2.14p2-1     ODBC tools libraries

Versions of packages slapd recommends:
ii  libsasl2-modules          2.1.23.dfsg1-5 Cyrus SASL - pluggable authenticat

Versions of packages slapd suggests:
ii  ldap-utils                    2.4.23-4   OpenLDAP utilities

-- debconf information:
  slapd/internal/generated_adminpw: (password omitted)
* slapd/password2: (password omitted)
  slapd/internal/adminpw: (password omitted)
* slapd/password1: (password omitted)
  slapd/tlsciphersuite:
  shared/organization: jamie-thompson.co.uk
  slapd/upgrade_slapcat_failure:
  slapd/backend: HDB
  slapd/allow_ldap_v2: false
  slapd/no_configuration: false
  slapd/move_old_database: true
  slapd/suffix_change: false
  slapd/dump_database_destdir: /var/backups/slapd-VERSION
  slapd/domain: jamie-thompson.co.uk
  slapd/password_mismatch:
  slapd/invalid_config: true
  slapd/slurpd_obsolete:
  slapd/dump_database: when needed
  slapd/purge_database: false





More information about the Pkg-openldap-devel mailing list