Actions
Bug #12887
closedfail to restart certain services on Ubuntu because of incomplete detection of systemd/upstart
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:
Description
On a Ubuntu 16.04 node, cron cannot be restarted by system technique - it is correctly running ( /usr/sbin/cron -f ), but verbose output says
rudder verbose: B: ***************************************************************** rudder verbose: B: BEGIN bundle service_action( {"cron","restart"}) rudder verbose: B: ***************************************************************** rudder verbose: V: + Private parameter: 'service_name' in scope 'service_action' (type: s) in pass 1 rudder verbose: V: + Private parameter: 'action' in scope 'service_action' (type: s) in pass 1 rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 1) rudder verbose: V: Computing value of 'canonified_service_name' rudder verbose: V: Computing value of 'canonified_action' rudder verbose: V: Computing value of 'old_class_prefix' rudder verbose: V: Computing value of 'promisers' rudder verbose: V: Computing value of 'class_prefix' rudder verbose: V: Computing value of 'args' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 1) rudder verbose: P: ......................................................... rudder verbose: P: BEGIN promise 'promise_service_action_cf_102' of type "methods" (pass 1) rudder verbose: P: Promiser/affected object: 'disable_reporting_service_action_cron' rudder verbose: P: From parameterized bundle: service_action( {"cron","restart"}) rudder verbose: P: Base context class: any rudder verbose: P: Stack path: /default/check_cron_daemon/methods/'restart_cron'/default/service_restart/methods/'restart always'/default/service_restart_if/methods/'restart'/default/service_action/methods/'disable_reporting_service_action_cron'[1] rudder verbose: B: ***************************************************************** rudder verbose: B: BEGIN bundle disable_reporting rudder verbose: B: ***************************************************************** rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 1) rudder verbose: V: Computing value of 'report_data.should_report' rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 2) rudder verbose: V: Computing value of 'report_data.should_report' rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 3) rudder verbose: V: Computing value of 'report_data.should_report' rudder verbose: A: ................................................... rudder verbose: A: Bundle Accounting Summary for 'disable_reporting' in namespace default rudder verbose: A: Zero promises executed for bundle 'disable_reporting' rudder verbose: A: ................................................... rudder verbose: Additional promise info: source path '/var/rudder/ncf/common/30_generic_methods/service_action.cf' at line 102 rudder verbose: Method 'disable_reporting' verified rudder verbose: B: ***************************************************************** rudder verbose: B: END bundle disable_reporting rudder verbose: B: ***************************************************************** rudder verbose: A: Promise was KEPT rudder verbose: P: END methods promise (disable_reporting_service_acti...) rudder verbose: P: ......................................................... rudder verbose: P: BEGIN promise 'promise_service_action_cf_104' of type "methods" (pass 1) rudder verbose: P: Promiser/affected object: 'action' rudder verbose: P: Part of bundle: service_action rudder verbose: P: Base context class: any rudder verbose: P: Stack path: /default/check_cron_daemon/methods/'restart_cron'/default/service_restart/methods/'restart always'/default/service_restart_if/methods/'restart'/default/service_action/methods/'action'[1] rudder verbose: B: ***************************************************************** rudder verbose: B: BEGIN bundle ncf_services( {"cron","restart"}) rudder verbose: B: ***************************************************************** rudder verbose: V: + Private parameter: 'service' in scope 'ncf_services' (type: s) in pass 1 rudder verbose: V: + Private parameter: 'action' in scope 'ncf_services' (type: s) in pass 1 rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 1) rudder verbose: V: Computing value of 'canonified_service' rudder verbose: V: Computing value of 'canonified_action' rudder verbose: V: Computing value of 'canonified_action_command' rudder verbose: V: Computing value of 'old_class_prefix' rudder verbose: V: Computing value of 'promisers' rudder verbose: V: Computing value of 'class_prefix' rudder verbose: V: Computing value of 'args' rudder verbose: A: Promise was KEPT rudder verbose: P: END defaults promise (actual_action) rudder verbose: A: Promise was KEPT rudder verbose: P: END defaults promise (actual_action) rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 1) rudder verbose: returnszero ran '/sbin/initctl status cron 2>&1 | /bin/grep 'Unknown job' > /dev/null' successfully and it did not return zero rudder verbose: Caching result for function 'returnszero("/sbin/initctl status ${service} 2>&1 | ${paths.path[grep]} 'Unknown job' > /dev/null","useshell")' rudder verbose: C: + Private class: is_upstart_service rudder verbose: C: + Private class: is_init_service rudder verbose: C: + Private class: pass1 rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 2) rudder verbose: V: Computing value of 'canonified_service' rudder verbose: V: Computing value of 'canonified_action' rudder verbose: V: Computing value of 'canonified_action_command' rudder verbose: V: Computing value of 'old_class_prefix' rudder verbose: V: Computing value of 'promisers' rudder verbose: V: Computing value of 'class_prefix' rudder verbose: V: Computing value of 'args' rudder verbose: A: Promise was KEPT rudder verbose: P: END defaults promise (actual_action) rudder verbose: A: Promise was KEPT rudder verbose: P: END defaults promise (actual_action) rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 2) rudder verbose: C: + Private class: pass2 rudder verbose: P: ......................................................... rudder verbose: P: BEGIN promise 'promise_ncf_lib_cf_1108' of type "methods" (pass 2) rudder verbose: P: Promiser/affected object: 'force_failure_class' rudder verbose: P: From parameterized bundle: ncf_services( {"cron","restart"}) rudder verbose: P: Base context class: pass2.(!method_found|(windows.!is_valid_action)) rudder verbose: P: Stack path: /default/check_cron_daemon/methods/'restart_cron'/default/service_restart/methods/'restart always'/default/service_restart_if/methods/'restart'/default/service_action/methods/'action'/default/ncf_services/methods/'force_failure_class'[1] rudder verbose: B: ***************************************************************** rudder verbose: B: BEGIN bundle _classes_failure( {"ncf_services_cron_restart"}) rudder verbose: B: ***************************************************************** rudder verbose: V: + Private parameter: 'destination_prefix' in scope '_classes_failure' (type: s) in pass 2 rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 1) rudder verbose: V: Computing value of 'prefix' rudder verbose: V: Computing value of 'suffix' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 1) rudder verbose: C: + Private class: destination_defined rudder verbose: C: + Private class: destination_not_empty rudder verbose: C: + Private class: destination_exists rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 2) rudder verbose: V: Computing value of 'prefix' rudder verbose: V: Computing value of 'suffix' rudder verbose: V: Computing value of 'repair_failed_local' rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: V: Computing value of 'local_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: V: Computing value of 'local_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: V: Computing value of 'local_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: V: Computing value of 'local_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: V: Computing value of 'local_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: V: Computing value of 'local_error' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 2) rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 3) rudder verbose: V: Computing value of 'prefix' rudder verbose: V: Computing value of 'suffix' rudder verbose: V: Computing value of 'repair_failed_local' rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: V: Computing value of 'local_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: V: Computing value of 'local_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: V: Computing value of 'local_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: V: Computing value of 'local_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: V: Computing value of 'local_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: V: Computing value of 'local_error' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 3) rudder verbose: C: + promise outcome class 'repair_failed_ncf_services_cron_restart' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_kept' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_ok' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_not_repaired' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_failed' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_reached' rudder verbose: C: + promise outcome class 'ncf_services_cron_restart_error' rudder verbose: A: ................................................... rudder verbose: A: Bundle Accounting Summary for '_classes_failure' in namespace default rudder verbose: A: Zero promises executed for bundle '_classes_failure' rudder verbose: A: ................................................... rudder verbose: Additional promise info: source path '/var/rudder/ncf/common/20_cfe_basics/ncf_lib.cf' at line 1108 rudder verbose: Method '_classes_failure' verified rudder verbose: B: ***************************************************************** rudder verbose: B: END bundle _classes_failure rudder verbose: B: ***************************************************************** rudder verbose: A: Promise was KEPT rudder verbose: P: END methods promise (force_failure_class) rudder verbose: P: ......................................................... rudder verbose: P: BEGIN promise 'promise_ncf_lib_cf_1109' of type "methods" (pass 2) rudder verbose: P: Promiser/affected object: 'force_failure_class' rudder verbose: P: Part of bundle: ncf_services rudder verbose: P: Base context class: pass2.(!method_found|(windows.!is_valid_action)) rudder verbose: P: Stack path: /default/check_cron_daemon/methods/'restart_cron'/default/service_restart/methods/'restart always'/default/service_restart_if/methods/'restart'/default/service_action/methods/'action'/default/ncf_services/methods/'force_failure_class'[1] rudder verbose: B: ***************************************************************** rudder verbose: B: BEGIN bundle _classes_failure( {"cf_null"}) rudder verbose: B: ***************************************************************** rudder verbose: V: + Private parameter: 'destination_prefix' in scope '_classes_failure' (type: s) in pass 2 rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 1) rudder verbose: V: Computing value of 'prefix' rudder verbose: V: Computing value of 'suffix' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 1) rudder verbose: C: + Private class: destination_defined rudder verbose: C: + Private class: destination_not_empty rudder verbose: C: + Private class: destination_exists rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 2) rudder verbose: V: Computing value of 'prefix' rudder verbose: V: Computing value of 'suffix' rudder verbose: V: Computing value of 'repair_failed_local' rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: V: Computing value of 'local_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: V: Computing value of 'local_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: V: Computing value of 'local_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: V: Computing value of 'local_failed' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: V: Computing value of 'local_reached' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: V: Computing value of 'local_error' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 2) rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 3) rudder verbose: V: Computing value of 'prefix' rudder verbose: V: Computing value of 'suffix' rudder verbose: V: Computing value of 'repair_failed_local' rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: V: Computing value of 'local_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: V: Computing value of 'local_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: V: Computing value of 'local_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: V: Computing value of 'local_failed' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: V: Computing value of 'local_reached' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: V: Computing value of 'local_error' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 3) rudder verbose: C: + promise outcome class 'repair_failed_cf_null' rudder verbose: C: + promise outcome class 'cf_null_not_kept' rudder verbose: C: + promise outcome class 'cf_null_not_ok' rudder verbose: C: + promise outcome class 'cf_null_not_repaired' rudder verbose: C: + promise outcome class 'cf_null_failed' rudder verbose: C: + promise outcome class 'cf_null_reached' rudder verbose: C: + promise outcome class 'cf_null_error' rudder verbose: A: ................................................... rudder verbose: A: Bundle Accounting Summary for '_classes_failure' in namespace default rudder verbose: A: Zero promises executed for bundle '_classes_failure' rudder verbose: A: ................................................... rudder verbose: Additional promise info: source path '/var/rudder/ncf/common/20_cfe_basics/ncf_lib.cf' at line 1109 rudder verbose: Method '_classes_failure' verified rudder verbose: B: ***************************************************************** rudder verbose: B: END bundle _classes_failure rudder verbose: B: ***************************************************************** rudder verbose: A: Promise was KEPT rudder verbose: P: END methods promise (force_failure_class) rudder verbose: Skipping promise 'force_failure_process' because 'if'/'ifvarclass' is not defined rudder verbose: Skipping promise 'force_failure_process' because 'if'/'ifvarclass' is not defined rudder verbose: Skipping promise 'force_success_process' because 'if'/'ifvarclass' is not defined rudder verbose: Skipping promise 'force_success_process' because 'if'/'ifvarclass' is not defined rudder verbose: V: ......................................................... rudder verbose: V: BEGIN variables (pass 3) rudder verbose: V: Computing value of 'canonified_service' rudder verbose: V: Computing value of 'canonified_action' rudder verbose: V: Computing value of 'canonified_action_command' rudder verbose: V: Computing value of 'old_class_prefix' rudder verbose: V: Computing value of 'promisers' rudder verbose: V: Computing value of 'class_prefix' rudder verbose: V: Computing value of 'args' rudder verbose: A: Promise was KEPT rudder verbose: P: END defaults promise (actual_action) rudder verbose: A: Promise was KEPT rudder verbose: P: END defaults promise (actual_action) rudder verbose: C: ......................................................... rudder verbose: C: BEGIN classes / conditions (pass 3) rudder verbose: C: + Private class: pass3 rudder verbose: Skipping promise 'force_failure_process' because 'if'/'ifvarclass' is not defined rudder verbose: Skipping promise 'force_failure_process' because 'if'/'ifvarclass' is not defined rudder verbose: Skipping promise 'force_success_process' because 'if'/'ifvarclass' is not defined rudder verbose: Skipping promise 'force_success_process' because 'if'/'ifvarclass' is not defined rudder verbose: A: ................................................... rudder verbose: A: Bundle Accounting Summary for 'ncf_services' in namespace default rudder verbose: A: Promises kept in 'ncf_services' = 3 rudder verbose: A: Promises not kept in 'ncf_services' = 0 rudder verbose: A: Promises repaired in 'ncf_services' = 0 rudder verbose: A: Aggregate compliance (promises kept/repaired) for bundle 'ncf_services' = 100.0% rudder verbose: A: ................................................... rudder verbose: Additional promise info: source path '/var/rudder/ncf/common/30_generic_methods/service_action.cf' at line 104 rudder verbose: Method 'ncf_services' verified rudder verbose: B: ***************************************************************** rudder verbose: B: END bundle ncf_services
Updated by Nicolas CHARLES over 6 years ago
output of /sbin/initctl status cron is
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Updated by Nicolas CHARLES over 6 years ago
- Project changed from Rudder to 41
- Subject changed from cron service fails to restart on ubuntu 16.04 to fail to restart certain services on Ubuntu because of incomplete detection of systemd/upstart
- Category changed from System techniques to Generic methods - Service Management
- Target version changed from 4.3.3 to 4.1.13
Updated by Nicolas CHARLES over 6 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES over 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Alexis Mousset
- Pull Request set to https://github.com/Normation/ncf/pull/787
Updated by Rudder Quality Assistant over 6 years ago
- Assignee changed from Alexis Mousset to Nicolas CHARLES
Updated by Nicolas CHARLES over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset ad638742e6754c8f15a4d45445bb8743d6193dba.
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from Pending release to Released
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Generic methods - Service Management to Generic methods
Actions