Bug #12661
closedArchitecture #12621: Explore alternative format for compliance table
Architecture #12648: Add migration script for table nodecompliancelevels
Rudder fails to boot because cleaning TTL property is added after rudder reboot by migration script
Description
The migration script seems to modify rudder-web.properties after Rudder reboot. So Rudder doesn't find the new `rudder.batch.reportscleaner.compliancelevels.delete.TTL` property and fails to boot with exception:
[2018-05-19 11:45:59] ERROR application - Fatal error during boot, Rudder will stop now java.lang.ExceptionInInitializerError: null >-at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftInitContextListener.scala:109) >-at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:746) >-at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:238) ... Caused by: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'rudder.batch.reportscleaner.compliancelevels' >-at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:152)
Upgrade log is:
Setting up rudder-jetty (4.1.12-xenial0) ... Setting up ncf (4.1.12-xenial0) ... Setting up rudder-techniques (4.1.12-xenial0) ... Setting up rudder-agent (4.1.12-xenial0) ... 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-server-relay (4.1.12-xenial0) ... INFO: Restarting Apache HTTPd... Done INFO: rudder-server-relay setup complete. Setting up ncf-api-virtualenv (4.1.12-xenial0) ... Conf ncf-api-virtualenv already enabled INFO: Restarting Apache HTTPd... Done Setting up rudder-webapp (4.1.12-xenial0) ... 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] ? 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. 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: New configuration property rudder.batch.reportscleaner.compliancelevels.delete.TTL added to /opt/rudder/etc/rudder-web.properties INFO: Checking PostgreSQL service status... OK INFO: Adding new 'compliance levels' table Done INFO: Checking LDAP service status... OK INFO: The migration has completed successfully. INFO: End of migration script [master 80ed429] Add ncf hooks to repository INFO: Restarting Rudder webapp and inventory-endpoint... Done Setting up rudder-inventory-ldap (4.1.12-xenial0) ... INFO: Restarting syslogd... Done INFO: Restarting rudder-slapd... Done Setting up rudder-inventory-endpoint (4.1.12-xenial0) ... INFO: Launching script to check if a migration is needed INFO: End of migration script Setting up rudder-reports (4.1.12-xenial0) ... INFO: Waiting for PostgreSQL to be up... Done Setting up rudder-server-root (4.1.12-xenial0) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... root@server:/var/rudder/share# vi /opt/rudder/etc/rudder-web.properties
Updated by François ARMAND over 6 years ago
- Status changed from New to In progress
Updated by François ARMAND over 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/1936
Updated by François ARMAND over 6 years ago
Solving that one by setting a default value for that new property. If the user want to change it, then in all case the property will be there, and the next reboot will be ok.
Updated by François ARMAND over 6 years ago
- Description updated (diff)
Well, in fact rudder-jetty seems to be restarted after the value is added. So not sure what happened. In all cases just restarting rudder-jetty solved the problem (ie: the property is correctly added).
Updated by François ARMAND over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|704d91702cd21678444f26a6fbe3171f87c3085a.
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.13 to 4.1.12
Updated by Benoît PECCATTE over 6 years ago
- Status changed from Pending release to Released