Project

General

Profile

Actions

Bug #12000

closed

Architecture #11647: Upgrade to Jetty9

Stop jetty7 service in preinst to prevent it from staying after upgrade

Added by Nicolas CHARLES almost 7 years ago. Updated almost 7 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

While upgrading from 4.2 to 4.3 beta, I got the following output:

Fetched 184 MB in 17s (10.6 MB/s)                                                                                                                                                           
Reading changelogs... Done
(Reading database ... 45791 files and directories currently installed.)
Preparing to unpack .../00-rudder-server-root_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking rudder-server-root (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../01-rudder-agent_4.3.0~alpha1~git201801180045-stretch0_amd64.deb ...
INFO: A back up copy of the /opt/rudder/etc/uuid.hive has been created in /var/backups/rudder
INFO: A back up copy of the /var/rudder/cfengine-community/policy_server.dat has been created in /var/backups/rudder
INFO: A back up copy of the /var/rudder/cfengine-community/ppkeys has been created in /var/backups/rudder
Unpacking rudder-agent (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../02-rudder-inventory-endpoint_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking rudder-inventory-endpoint (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../03-rudder-inventory-ldap_4.3.0~alpha1~git201801180045-stretch0_amd64.deb ...
Unpacking rudder-inventory-ldap (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../04-rudder-jetty_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking rudder-jetty (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
dpkg: warning: unable to delete old directory '/opt/rudder/jetty7/contexts': Directory not empty
dpkg: warning: unable to delete old directory '/opt/rudder/jetty7': Directory not empty
Preparing to unpack .../05-rudder-reports_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking rudder-reports (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../06-rudder-webapp_4.3.0~alpha1~git201801180045-stretch0_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 rudder-webapp (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../07-rudder-server-relay_4.3.0~alpha1~git201801180045-stretch0_amd64.deb ...
Unpacking rudder-server-relay (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../08-ncf-api-virtualenv_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking ncf-api-virtualenv (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../09-rudder-techniques_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking rudder-techniques (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Preparing to unpack .../10-ncf_4.3.0~alpha1~git201801180045-stretch0_all.deb ...
Unpacking ncf (4.3.0~alpha1~git201801180045-stretch0) over (4.2.4~rc1~git201801170234-stretch0) ...
Setting up rudder-jetty (4.3.0~alpha1~git201801180045-stretch0) ...
Installing new version of config file /opt/rudder/etc/rudder-jetty.conf ...
Installing new version of config file /etc/init.d/rudder-jetty ...
Setting up ncf (4.3.0~alpha1~git201801180045-stretch0) ...
Setting up rudder-techniques (4.3.0~alpha1~git201801180045-stretch0) ...
Setting up rudder-inventory-ldap (4.3.0~alpha1~git201801180045-stretch0) ...

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] ? D

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
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
Processing triggers for systemd (232-25+deb9u1) ...
Setting up rudder-agent (4.3.0~alpha1~git201801180045-stretch0) ...
ok: Rudder agent is now disabled.
ok: stop service rudder-agent succeeded
INFO: Ensuring correct permissions on the keys directory... Done.
ok: Rudder agent has been enabled but not started, wait for next cron run.
ok: start service rudder-agent succeeded
INFO: Scheduling an inventory during next run...
Setting up rudder-reports (4.3.0~alpha1~git201801180045-stretch0) ...
INFO: Waiting for PostgreSQL to be up... Done
Processing triggers for rsyslog (8.24.0-1) ...
Setting up ncf-api-virtualenv (4.3.0~alpha1~git201801180045-stretch0) ...
Conf ncf-api-virtualenv already enabled
INFO: Restarting Apache HTTPd... Done
Setting up rudder-server-relay (4.3.0~alpha1~git201801180045-stretch0) ...
INFO: Restarting Apache HTTPd... Done
INFO: rudder-server-relay setup complete.
dpkg: dependency problems prevent configuration of rudder-server-root:
 rudder-server-root depends on rudder-inventory-ldap (= 4.3.0~alpha1~git201801180045-stretch0); however:
  Package rudder-inventory-ldap is not configured yet.

dpkg: error processing package rudder-server-root (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of rudder-inventory-endpoint:
 rudder-inventory-endpoint depends on rudder-inventory-ldap (= 4.3.0~alpha1~git201801180045-stretch0); however:
  Package rudder-inventory-ldap is not configured yet.

dpkg: error processing package rudder-inventory-endpoint (--configure):
 dependency problems - leaving unconfigured
Setting up rudder-webapp (4.3.0~alpha1~git201801180045-stretch0) ...
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: A Technique library reload is needed and has been scheduled.
[master 230c5dc] Update technique editor hook "ncf-hooks.d/post.write_technique.10_commit.sh" 
[master 4509ab0] Update technique editor hook "ncf-hooks.d/post.write_technique.50_rudderify.sh" 
[master a2aa54e] Update technique editor hook "ncf-hooks.d/post.write_technique.90_reload.sh" 
INFO: The /var/rudder/configuration-repository/techniques/ncf_techniques/category.xml file already exists. Not updating.
INFO: Alternative source path added: /var/rudder/configuration-repository/ncf
INFO: Checking PostgreSQL service status... OK
INFO: Checking LDAP service status............ FAILED
LDAP service verification failed after 10 tries.

ERROR: The migration has failed in some steps. Check previous error messages.
Please restart the failed service(s), and start the migration script again.
(on a single Rudder server, try service rudder restart)
Once it is working, run:
# /opt/rudder/bin/rudder-upgrade
INFO: End of migration script
INFO: Restarting Rudder webapp and inventory-endpoint...dpkg: error processing package rudder-webapp (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rudder-inventory-ldap
 rudder-server-root
 rudder-inventory-endpoint
 rudder-webapp
E: Sub-process /usr/bin/dpkg returned an error code (1)


Subtasks 2 (0 open2 closed)

Bug #12016: When migrating from 4.x to 4.3, rudder-slapd fails to restartReleasedAlexis MoussetActions
Bug #12030: Only stop jetty in preinst during upgradesReleasedBenoît PECCATTEActions
Actions #1

Updated by Nicolas CHARLES almost 7 years ago

slapd fails to start:

-- Unit rudder-slapd.service has begun starting up.
Jan 18 09:24:14 server rudder-slapd[15980]: [INFO] Using /etc/default/rudder-slapd for configuration
Jan 18 09:24:14 server rudder-slapd[15969]: <166>Jan 18 09:24:14 rudder-slapd[15980]: [INFO] Using /etc/default/rudder-slapd for configuration
Jan 18 09:24:14 server rudder-slapd[15985]: [OK] virtual memory limit set to unlimited
Jan 18 09:24:14 server rudder-slapd[15969]: <166>Jan 18 09:24:14 rudder-slapd[15985]: [OK] virtual memory limit set to unlimited
Jan 18 09:24:14 server rudder-slapd[15986]: [INFO] Launching OpenLDAP configuration test...
Jan 18 09:24:14 server rudder-slapd[15969]: <166>Jan 18 09:24:14 rudder-slapd[15986]: [INFO] Launching OpenLDAP configuration test...
Jan 18 09:24:14 server rudder-slapd[15988]: [ALERT] OpenLDAP configuration test failed
Jan 18 09:24:14 server rudder-slapd[15969]: <161>Jan 18 09:24:14 rudder-slapd[15988]: [ALERT] OpenLDAP configuration test failed
Jan 18 09:24:14 server systemd[1]: rudder-slapd.service: Control process exited, code=exited status=1
Jan 18 09:24:14 server systemd[1]: Failed to start LSB: OpenLDAP.
-- Subject: Unit rudder-slapd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit rudder-slapd.service has failed.
-- 
-- The result is failed.
Jan 18 09:24:14 server systemd[1]: rudder-slapd.service: Unit entered failed state.
Jan 18 09:24:14 server systemd[1]: rudder-slapd.service: Failed with result 'exit-code'.

causes is :

5a605b39 lt_dlopenext failed: (back_hdb.la) file not found
5a605b39 /opt/rudder/etc/openldap/slapd.conf: line 15: <moduleload> handler exited with 1!

so we should remove this line at upgrade.

Actions #2

Updated by Nicolas CHARLES almost 7 years ago

Jetty fails to restart, as we don't stop jetty7 ... restarting again results in exactly nothing as java process still holds

Actions #3

Updated by Alexis Mousset almost 7 years ago

  • Status changed from New to In progress
  • Assignee set to Alexis Mousset
Actions #4

Updated by Alexis Mousset almost 7 years 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/1465
Actions #5

Updated by Alexis Mousset almost 7 years ago

  • Subject changed from On Debian 9, upgrading from Rudder 4.2 to 4.3 fails in multiple way to Stop jetty7 service in preinst to prevent it from staying after upgrade
Actions #6

Updated by Alexis Mousset almost 7 years ago

  • Status changed from Pending technical review to Pending release
Actions #7

Updated by Vincent MEMBRÉ almost 7 years ago

  • Parent task set to #11647
Actions #8

Updated by Vincent MEMBRÉ almost 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~beta1 which was released today.

Actions

Also available in: Atom PDF