Project

General

Profile

Actions

Bug #6199

closed

When migrating from 2.10 to 2.11, if BDB need to be upgraded, all changes made by rudder-upgrade are reverted

Added by Nicolas CHARLES about 9 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When we cahnge the version of BDB, we restore the LDAP backup made in the pre-inst of the package, so before rudder-upgrade has been run
Unfortunately, the restore is made after the rudder-upgrade has been made, so we lose everything :/

I ended up having a server with proper promises (with server roles), but not any data about this anymore in the webapp

If we update the bdb format and restore the ldap backup, we MUST run the rudder-upgrade script, if present on the system

Install log is:

Preparing to replace rudder-webapp 2.10.8-wheezy0 (using .../rudder-webapp_2.11.7~rc1~git201501282134-wheezy0_all.deb) ...
********************************************************************************
INFO: dpkg may ask you if you want to replace rudder-web.properties or          
INFO: inventory-web.properties with the maintainer version if you modified it.  
INFO:                                                                           
INFO: If you accept, please keep in mind that you will lose any manual          
INFO: modification in this file, like the syslog port or the workflows and will 
INFO: certainly have to add them again.                                         
INFO:                                                                           
INFO: We recommend that you respond NO to this question                         
INFO: ('keep your currently-installed version'). Rudder's upgrade script will   
INFO: take care of this automatically.                                          
INFO:                                                                           
********************************************************************************
Unpacking replacement rudder-webapp ...
Preparing to replace rudder-inventory-endpoint 2.10.8-wheezy0 (using .../rudder-inventory-endpoint_2.11.7~rc1~git201501282134-wheezy0_all.deb) ...
Unpacking replacement rudder-inventory-endpoint ...
Preparing to replace rudder-inventory-ldap 2.10.8-wheezy0 (using .../rudder-inventory-ldap_2.11.7~rc1~git201501282134-wheezy0_amd64.deb) ...
Unpacking replacement rudder-inventory-ldap ...
Preparing to replace rudder-techniques 2.10.8-wheezy0 (using .../rudder-techniques_2.11.7~rc1~git201501282134-wheezy0_all.deb) ...
Unpacking replacement rudder-techniques ...
Preparing to replace rudder-jetty 2.10.8-wheezy0 (using .../rudder-jetty_2.11.7~rc1~git201501282134-wheezy0_all.deb) ...
Unpacking replacement rudder-jetty ...
Preparing to replace rudder-reports 2.10.8-wheezy0 (using .../rudder-reports_2.11.7~rc1~git201501282134-wheezy0_all.deb) ...
Unpacking replacement rudder-reports ...
Processing triggers for man-db ...
Processing triggers for menu ...
Setting up python2.6-minimal (2.6.8-1.1) ...
Linking and byte-compiling packages for runtime python2.6...
Setting up python2.7-minimal (2.7.3-6+deb7u2) ...
Setting up python2.7 (2.7.3-6+deb7u2) ...
Setting up ldap-utils (2.4.31-1+nmu2) ...
Setting up python2.6 (2.6.8-1.1) ...
Setting up libpython2.6 (2.6.8-1.1) ...
Setting up libpython2.7 (2.7.3-6+deb7u2) ...
Setting up libapache2-mod-wsgi (3.3-4+deb7u1) ...
[....] Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
. ok 
Setting up ncf (0.201501282339-wheezy1) ...
Setting up ncf-api-virtualenv (2.11.7~rc1~git201501282134-wheezy1) ...
INFO: Creating the ncf-api-venv user... Done
INFO: Restarting Apache HTTPd... Done
Setting up rudder-agent (2.11.7~rc1~git201501282134-wheezy0) ...
Making sure that the permissions on the CFEngine key directory are correct...
rudder-agent[30670]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[30673]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[30674]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[30682]: [OK] CFEngine Community cf-serverd stopped after 2 seconds
rudder-agent[30683]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[30823]: [ALERT] cf-execd still running (PID 13360), try: /etc/init.d/rudder-agent forcestop
rudder-agent[30833]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[30836]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[30842]: [INFO] Found no CFEngine Community cf-serverd processes running
rudder-agent[30849]: [INFO] Killing CFEngine Community cf-execd with force...
rudder-agent[30851]: [OK] CFEngine Community cf-execd killed with force (PID 13360)
CFEngine binaries copied to workdir
rudder-agent[31314]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[31317]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[31318]: [INFO] Launching CFEngine Community cf-serverd...
/var/rudder/cfengine-community/inputs/common/1.0/cf-served.cf:136:68: warning: Deprecated constraint 'skipverify' in body type 'server' [-Wdeprecated]
        skipverify        => { "127.0.0.0/8" , "::1",  @{def.acl}  };
                                                                   ^
rudder-agent[31766]: [OK] CFEngine Community cf-serverd started after 1 seconds
rudder-agent[31767]: [INFO] Launching CFEngine Community cf-execd...
/var/rudder/cfengine-community/inputs/common/1.0/cf-served.cf:136:68: warning: Deprecated constraint 'skipverify' in body type 'server' [-Wdeprecated]
        skipverify        => { "127.0.0.0/8" , "::1",  @{def.acl}  };
                                                                   ^
rudder-agent[32216]: [OK] CFEngine Community cf-execd started after 1 seconds
rudder-agent[32230]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[32233]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[32234]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[32238]: [OK] CFEngine Community cf-serverd stopped after 2 seconds
rudder-agent[32239]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[32244]: [OK] CFEngine Community cf-execd stopped after 2 seconds
CFEngine binaries copied to workdir
rudder-agent[32600]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[32603]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[32604]: [INFO] Launching CFEngine Community cf-serverd...
/var/rudder/cfengine-community/inputs/common/1.0/cf-served.cf:136:68: warning: Deprecated constraint 'skipverify' in body type 'server' [-Wdeprecated]
        skipverify        => { "127.0.0.0/8" , "::1",  @{def.acl}  };
                                                                   ^
rudder-agent[589]: [OK] CFEngine Community cf-serverd started after 1 seconds
rudder-agent[590]: [INFO] Launching CFEngine Community cf-execd...
/var/rudder/cfengine-community/inputs/common/1.0/cf-served.cf:136:68: warning: Deprecated constraint 'skipverify' in body type 'server' [-Wdeprecated]
        skipverify        => { "127.0.0.0/8" , "::1",  @{def.acl}  };
                                                                   ^
rudder-agent[1039]: [OK] CFEngine Community cf-execd started after 1 seconds
Setting up rudder-jetty (2.11.7~rc1~git201501282134-wheezy0) ...
Installing new version of config file /etc/init.d/rudder-jetty ...
Setting up rudder-techniques (2.11.7~rc1~git201501282134-wheezy0) ...
Setting up rudder-webapp (2.11.7~rc1~git201501282134-wheezy0) ...

Configuration file `/opt/rudder/etc/rudder-web.properties'
 ==> 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.
*** rudder-web.properties (Y/I/N/O/D/Z) [default=N] ? N
Installing new version of config file /opt/rudder/etc/rudder-users.xml ...
Installing new version of config file /opt/rudder/etc/rudder-apache-common.conf ...
Installing new version of config file /etc/apache2/sites-available/rudder-vhost ...
Installing new version of config file /etc/apache2/sites-available/rudder-vhost-ssl ...
INFO: Restarting syslog...Done
INFO: Restarting Apache HTTPd... Done
INFO: Launching script to check if a migration is needed
INFO: Checking if rudder-web.properties database access credentials are all right... LDAP OK,  SQL OK
INFO: Checking if inventory-web.properties database access credentials are all right... LDAP OK,  SQL skipped
INFO: Checking LDAP service status... OK
INFO: Checking PostgreSQL service status... OK
INFO: A Technique library reload is needed and has been scheduled.
INFO: Adding System Technique, Directive and Rule to manage Rudder Server Roles... Done.
INFO: Adding system Group of all nodes that are not a Rudder server component... Done.
INFO: Unwanted OpenLDAP indexes have been detected and removed, reindexing... Done
INFO: New configuration property rudder.server-roles.web added to /opt/rudder/etc/rudder-web.properties
INFO: New configuration property rudder.cfengine.reload.server.command added to /opt/rudder/etc/rudder-web.properties

INFO: The migration has completed successfully.
INFO: End of migration script
INFO: Creating group rudder... Done
INFO: Adding ncf-api-venv to the rudder group... Done
INFO: Restarting Rudder webapp and inventory-endpoint... Done
Setting up rudder-inventory-ldap (2.11.7~rc1~git201501282134-wheezy0) ...

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] ? N
Installing new version of config file /etc/default/rudder-slapd ...

Configuration file `/var/rudder/ldap/openldap-data/DB_CONFIG'
 ==> 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.
*** DB_CONFIG (Y/I/N/O/D/Z) [default=N] ? N
Installing new version of config file /etc/init.d/rudder-slapd ...
INFO: Restarting syslogd... Done
INFO: Stopping rudder-slapd... Done
_#################### 100.00% eta   none elapsed            none fast!         
Closing DB...
INFO: Starting rudder-slapd... Done
INFO: OpenLDAP database was successfully upgraded to new format
INFO: You can safely remove the backups in /var/rudder/ldap/openldap-data-backup-upgrade-on-20150129103454/
INFO: and /var/rudder/ldap/backup/openldap-data-pre-upgrade-20150129103454.ldif
INFO: Restarting rudder-slapd... Done
rudder-slapd[5471]: [INFO] Using /etc/default/rudder-slapd for configuration
rudder-slapd[5476]: [INFO] Halting OpenLDAP...
rudder-slapd[5480]: [OK] OpenLDAP stopped after 1 seconds
rudder-slapd[5481]: [INFO] Launching OpenLDAP database backup...
rudder-slapd[5498]: [OK] data save in /var/rudder/ldap/backup/openldap-data-20150129105856.ldif
rudder-slapd[5500]: [INFO] Halting OpenLDAP replication...
rudder-slapd[5501]: [INFO] no replica found in configuration, aborting stopping slurpd
rudder-slapd[5502]: [INFO] Launching OpenLDAP configuration test...
rudder-slapd[5504]: [OK] OpenLDAP configuration test successful
rudder-slapd[5505]: [INFO] Launching OpenLDAP replication...
rudder-slapd[5506]: [INFO] no replica found in configuration, aborting lauching slurpd
rudder-slapd[5507]: [INFO] no db_recover done
rudder-slapd[5508]: [INFO] Launching OpenLDAP...
rudder-slapd[5509]: [OK] file descriptor limit set to 1024
rudder-slapd[5520]: [OK] OpenLDAP started on port 389 and 636
rudder-slapd[5521]: [INFO] Prefetching data for cache warmup
Setting up rudder-inventory-endpoint (2.11.7~rc1~git201501282134-wheezy0) ...
INFO: Launching script to check if a migration is needed
INFO: End of migration script
[ ok ] Stopping enhanced syslogd: rsyslogd.
[ ok ] Starting enhanced syslogd: rsyslogd.
Setting up rudder-reports (2.11.7~rc1~git201501282134-wheezy0) ...

Configuration file `/etc/rsyslog.d/rudder.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.
*** rudder.conf (Y/I/N/O/D/Z) [default=N] ? N
[ ok ] Stopping enhanced syslogd: rsyslogd.
[ ok ] Starting enhanced syslogd: rsyslogd.
INFO: Waiting for postgresql to be up... Done
Setting up rudder-server-root (2.11.7~rc1~git201501282134-wheezy0) ...
Processing triggers for menu ...


Related issues 1 (0 open1 closed)

Has duplicate Rudder - Bug #5280: When the ldap tree changes, Rudder can't always access new info after an updateRejectedNicolas CHARLES2014-07-21Actions
Actions #1

Updated by Nicolas CHARLES about 9 years ago

  • Project changed from Rudder to 34
Actions #2

Updated by Matthieu CERDA about 9 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Matthieu CERDA to Nicolas CHARLES
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/606
Actions #3

Updated by Matthieu CERDA about 9 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset rudder-packages|commit:397627d316f29e7786b078b8d6caeb71b2ef3b3b.

Actions #4

Updated by Nicolas CHARLES about 9 years ago

Applied in changeset rudder-packages|commit:38d767a8a05a0863605632297d0153ee48f49905.

Actions #5

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.11.6 to 2.11.7
Actions #6

Updated by Vincent MEMBRÉ about 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.7, which was released these days.

Actions #7

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF