the same happened to me:
when upgrading from  2.1.23-1 to 2.2.23-8

apt-get upgrade | tee -a /var/log/some-upgrade.log

...
Hole:3 http://ftp.de.debian.org sarge/main ldap-utils 2.2.23-8 [119kB]
Hole:4 http://ftp.de.debian.org sarge/main libgnutls11 1.0.16-13.1 [301kB]
Hole:5 http://ftp.de.debian.org sarge/main slapd 2.2.23-8 [817kB]
Hole:6 http://ftp.de.debian.org sarge/main libldap2 2.1.30-8 [149kB]
Hole:7 http://ftp.de.debian.org sarge/main libldap-2.2-7 2.2.23-8 [151kB]
...
Vorkonfigurieren der Pakete ...
Konfiguriere slapd
------------------

Before upgrading to a new version of the OpenLDAP server the data of your 
LDAP directories can be dumped to plain text
files (LDIF format) which is a standardized description of that data (LDIF 
stands for LDAP Data Interchange Format).

Selecting "always" will make the maintainer scripts dump your databases 
before upgrading unconditionally. Selecting "when
needed" will only dump the database if the new version is incompatible with 
the old database format and it has to be
reimported. The "never" choice will just go ahead without ever dumping your 
database.

  1. always  2. when needed  3. never

(...1, accept the default...)

Please specify the directory where the LDAP databases will be exported. 
Within this directory several LDIF files are
created which correspond to the search bases located on the server. Make 
sure you have enough free space on the partition
the directory is located.  The first occurrence of the string "VERSION" is 
replaced with the server version you are
upgrading from. The default is /var/backups/slapd-VERSION



...
Vorbereiten zum Ersetzen von ldap-utils 2.1.23-1 
(durch .../ldap-utils_2.2.23-8_i386.deb) ...
Entpacke Ersatz für ldap-utils ...
Wähle vormals abgewähltes Paket libgnutls11.
Entpacke libgnutls11 (aus .../libgnutls11_1.0.16-13.1_i386.deb) ...
Vorbereiten zum Ersetzen von slapd 2.1.23-1 
(durch .../slapd_2.2.23-8_i386.deb) ...
Stopping OpenLDAP: slapd.

(garbage, hiccup perhaps because of stdout redirected to a logfile)

Entpacke Ersatz für libldap2 ...
Wähle vormals abgewähltes Paket libldap-2.2-7.
...
then it stops with:
dpkg: error processing /var/cache/apt/archives/slapd_2.2.23-8_i386.deb 
(--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/slapd_2.2.23-8_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


There is no /usr/share/ldap directory! Gone alltogether.

trying again:

# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
  slapd
Recommended packages:
  db4.2-util
The following packages will be upgraded:
  slapd
1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
22 not fully installed or removed.
Need to get 0B/817kB of archives.
After unpacking 266kB disk space will be freed.
Do you want to continue? [Y/n]
Preconfiguring packages ...
(Reading database ... 23168 files and directories currently installed.)
Preparing to replace slapd 2.1.23-1 (using .../slapd_2.2.23-8_i386.deb) ...
  Dumping to /var/backups/slapd-2.1.23-1:
  - directory dc=produktivit, dc=com... slapcat: bad configuration file!
failed.
dpkg: error processing /var/cache/apt/archives/slapd_2.2.23-8_i386.deb 
(--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/slapd_2.2.23-8_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

in the Syslog I find: 
slapcat: error loading ucdata (error -127)

Of course, with no unicode data in /usr/share/ldap!

~# debconf-show slapd
* slapd/password1: (password omitted)
  slapd/internal/adminpw: (password omitted)
* slapd/password2: (password omitted)
* slapd/allow_ldap_v2: true
  slapd/password_mismatch:
  slapd/suffix_change: false
  slapd/fix_directory: true
  slapd/invalid_config: true
  shared/organization:
  slapd/slave_databases_require_updateref:
* slapd/dump_database_destdir: /var/backups/slapd-VERSION
  slapd/upgrade_slapcat_failure:
  slapd/autoconf_modules: true
  slapd/purge_database: false
  slapd/admin:
  slapd/domain:
  slapd/backend: BDB
  slapd/no_configuration: false
  slapd/migrate_ldbm_to_bdb: false
  slapd/move_old_database: true
* slapd/dump_database: always
  slapd/upgrade_slapadd_failure:


Intimidating!

After changing slapd/dump_database to "never" the upgrade fails later at 
re-importing the non-existing dump.

# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up slapd (2.2.23-8) ...
  Backing up /etc/ldap/slapd.conf in /var/backups/slapd-2.1.23-1... done.
  Enabling LDAPv2 support... already enabled.
  Updating config access directives... done.
  Moving old database directories to /var/backups:
  Loading from /var/backups/slapd-2.1.23-1:
  - directory dc=produktivit, dc=com... /var/lib/dpkg/info/slapd.postinst: 
line 1: /var/backups/slapd-2.1.23-1/dc=produktivit, dc=com.ldif: No such 
file or directory
/var/lib/dpkg/info/slapd.postinst: line 153: [: : integer expression 
expected
failed.

Loading the database from the LDIF dump failed with the following
error while running slapadd:
    /var/backups/slapd-2.1.23-1/dc=produktivit, dc=com.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
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now I will have to resort to the backup elsewhere.

Mark

Reply via email to