Project

General

Profile

Bug #10517

slapd migration for 4.1 is not done on Ubuntu 16.04

Added by Nicolas CHARLES 8 months ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Target version (plugin):
Severity:
User visibility:
Effort required:
Priority:
0

Description

When upgrading on Ubuntu16, I get the following error

INFO: The migration has completed successfully.
INFO: End of migration script
INFO: Restarting Rudder webapp and inventory-endpoint... Done
Setting up rudder-inventory-ldap (4.1.0~rc2~git201703280907-xenial0) ...

Configuration file '/opt/rudder/etc/openldap/slapd.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** slapd.conf (Y/I/N/O/D/Z) [default=N] ? 
Installing new version of config file /etc/default/rudder-slapd ...
Installing new version of config file /etc/init.d/rudder-slapd ...
INFO: Restarting syslogd... Done
INFO: Restarting rudder-slapd...Job for rudder-slapd.service failed because the control process exited with error code. See "systemctl status rudder-slapd.service" and "journalctl -xe" for details.
dpkg: error processing package rudder-inventory-ldap (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of rudder-inventory-endpoint:
 rudder-inventory-endpoint depends on rudder-inventory-ldap (= 4.1.0~rc2~git201703280907-xenial0); however:
  Package rudder-inventory-ldap is not configured yet.

dpkg: error processing package rudder-inventory-endpoint (--configure):
 dependency problems - leaving unconfigured
Setting up rudder-reports (4.1.0~rc2~git201703280907-xenial0) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          INFO: Waiting for PostgreSQL to be up... Done
dpkg: dependency problems prevent configuration of rudder-server-root:
 rudder-server-root depends on rudder-inventory-endpoint (= 4.1.0~rc2~git201703280907-xenial0); however:
  Package rudder-inventory-endpoint is not configured yet.
 rudder-server-root depends on rudder-inventory-ldap (= 4.1.0~rc2~git201703280907-xenial0); however:
  Package rudder-inventory-ldap is not configured yet.

dpkg: error processing package rudder-server-root (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu12) ...No apport report written because the error message indicates its a followup error from a previous failure.

Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for libc-bin (2.23-0ubuntu4) ...
Errors were encountered while processing:
 rudder-inventory-ldap
 rudder-inventory-endpoint
 rudder-server-root
E: Sub-process /usr/bin/dpkg returned an error code (1)

journalctl says

Mar 28 10:06:35 server systemd[1]: Starting LSB: OpenLDAP...
Mar 28 10:06:35 server rudder-slapd[14636]: [INFO] Using /etc/default/rudder-slapd for configuration
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14636]: [INFO] Using /etc/default/rudder-slapd for configuration
Mar 28 10:06:35 server rudder-slapd[14641]: [OK] virtual memory limit set to unlimited
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14641]: [OK] virtual memory limit set to unlimited
Mar 28 10:06:35 server rudder-slapd[14642]: [INFO] Launching OpenLDAP configuration test...
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14642]: [INFO] Launching OpenLDAP configuration test...
Mar 28 10:06:35 server rudder-slapd[14644]: [OK] OpenLDAP configuration test successful
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14644]: [OK] OpenLDAP configuration test successful
Mar 28 10:06:35 server rudder-slapd[14645]: [INFO] Launching OpenLDAP replication...
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14645]: [INFO] Launching OpenLDAP replication...
Mar 28 10:06:35 server rudder-slapd[14646]: [INFO] no replica found in configuration, aborting lauching slurpd
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14646]: [INFO] no replica found in configuration, aborting lauching slurp
Mar 28 10:06:35 server rudder-slapd[14647]: [INFO] no db_recover done
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14647]: [INFO] no db_recover done
Mar 28 10:06:35 server rudder-slapd[14648]: [INFO] Launching OpenLDAP...
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14648]: [INFO] Launching OpenLDAP...
Mar 28 10:06:35 server rudder-slapd[14649]: [OK] file descriptor limit set to 1024
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14649]: [OK] file descriptor limit set to 1024
Mar 28 10:06:35 server rudder-slapd[14654]: [INFO] Using /etc/default/rudder-slapd for configuration
Mar 28 10:06:35 server rudder-slapd[14621]: <166>Mar 28 10:06:35 rudder-slapd[14654]: [INFO] Using /etc/default/rudder-slapd for configuration
Mar 28 10:06:36 server rudder-slapd[14659]: @(#) $OpenLDAP: slapd 2.4.44 (Mar 28 2017 07:32:50) $
                                                    root@ubuntu-builder-16-04-64:/usr/src/rudder-packages/package/SOURCES/openldap-source/servers/slapd
Mar 28 10:06:36 server rudder-slapd[14659]: /opt/rudder/etc/openldap/slapd.conf: line 50: unknown directive <maxsize> inside backend database definitio
Mar 28 10:06:36 server rudder-slapd[14659]: slapd stopped.
Mar 28 10:06:36 server slapd[14659]: connections_destroy: nothing to destroy.
Mar 28 10:06:37 server rudder-slapd[14661]: [ALERT] no PID file for rudder-slapd


Related issues

Duplicated by Rudder - Bug #10505: During a migration from 4.0 to 4.1, ldap base was emptied Rejected

Associated revisions

Revision 5e4b99a5
Added by Alexis MOUSSET 8 months ago

Fixes #10517: Error when upgrading on Ubuntu16 from 4.0 to 4.1

History

#1 Updated by Nicolas CHARLES 8 months ago

Cause is:

database        hdb

suffix          "cn=rudder-configuration" 
maxsize 107374182400
idlcachesize 960000
cachesize 320000


in openldap configuration file

it's like postinst didn't run properly

#2 Updated by Nicolas CHARLES 8 months ago

as requested:
Log don't show a migratoin

Installing new version of config file /etc/default/rudder-slapd ... 
Installing new version of config file /etc/init.d/rudder-slapd ... 
INFO: Restarting syslogd... Done INFO: Restarting rudder-slapd..

file /var/rudder/ldap/backup/openldap-data-pre-upgrade-20170328100440.ldif.gz exists, and /var/rudder/ldap/backup/openldap-data-pre-upgrade-20170328100440.libdb-version contains libdb-5.1.so

ldd /opt/rudder/sbin/slapcat | grep libdb | cut -d"=" -f1
    libdb-5.1.so 

since version of libdb didn't change, it doesn't upgrade anything

#3 Updated by Alexis MOUSSET 8 months ago

  • Status changed from New to In progress
  • Assignee set to Alexis MOUSSET

#4 Updated by François ARMAND 8 months ago

So, the idea is to look for the existence of file "/var/rudder/ldap/openldap-data/data.mdb" and do the migration is not here (and actually a migration not a first install).

That will also, most certainly, correct #10505

#5 Updated by François ARMAND 8 months ago

  • Related to Bug #10505: During a migration from 4.0 to 4.1, ldap base was emptied added

#6 Updated by Alexis MOUSSET 8 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1322

#7 Updated by Alexis MOUSSET 8 months ago

  • Status changed from Pending technical review to Pending release

#8 Updated by François ARMAND 8 months ago

  • Related to deleted (Bug #10505: During a migration from 4.0 to 4.1, ldap base was emptied)

#9 Updated by François ARMAND 8 months ago

  • Duplicated by Bug #10505: During a migration from 4.0 to 4.1, ldap base was emptied added

#10 Updated by Alexis MOUSSET 8 months ago

  • Subject changed from Error when upgrading on Ubuntu16 from 4.0 to 4.1 to slapd migration for 4.1 is not done on Ubuntu 16.04
  • Priority set to 0

#11 Updated by Benoît PECCATTE 8 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.0 which was released today.

Also available in: Atom PDF