Project

General

Profile

Actions

Bug #6566

closed

Bug #6737: Make all techniques compatible with systemd changes

promises.cf's "bundle agent check_cron_daemon" is not systemd aware

Added by Janos Mattyasovszky almost 9 years ago. Updated almost 9 years ago.

Status:
Released
Priority:
N/A
Assignee:
Matthieu CERDA
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

OS: SLES12 GA
Agent: rudder-agent-3.1.0.alpha1.git201505060128-1.SLES.12.x86_64
Root: rudder-server-root-3.0.4.release-1.SLES.11

rudder agent run shows these errors:

2015-05-06T13:27:42+0200    error: /default/check_cron_daemon/commands/'/etc/init.d/cron restart'[0]: Proposed executable file '/etc/init.d/cron' doesn't exist
2015-05-06T13:27:42+0200    error: /default/check_cron_daemon/commands/'/etc/init.d/cron restart'[0]: '/etc/init.d/cron restart' promises to be executable but isn't
R: @@Common@@result_error@@hasPolicyServer-root@@common-root@@00@@CRON Daemon@@None@@2015-05-06 11:27:41+00:00##bcd71b67-8a11-4426-85f9-f1056870fb32@#The CRON daemon was not running and could not be restarted

The actually false-positive error comes from the process not matching the regex in the promises: "/usr/sbin/cron$"

On SLES12 this actually looks like this:

sles12:/var/rudder/cfengine-community/inputs # ps auxfwww | grep cron
root      94992  0.0  0.0   9236   936 pts/3    S+   13:29   0:00                      \_ grep --color=auto cron
root      14867  0.0  0.0  18848  1544 ?        Ss   Feb23   0:02 /usr/sbin/cron -n

The promises.cf in use also does not know how to restart the cron daemon, as it still tries to use the init.d script:

sles12:/var/rudder/cfengine-community/inputs # grep -n /etc/init.d/ promises.cf  -C4
374-  vars:
375-
376-    redhat::
377-      "cron_bin" string => "crond$";
378:      "cron_restartcmd" string => "/etc/init.d/crond restart";
379-
380-    ubuntu::
381-      "cron_bin" string => "cron$";
382:      "cron_restartcmd" string => "/etc/init.d/cron restart";
383-
384-    !(redhat|ubuntu)::
385-      "cron_bin" string => "/usr/sbin/cron$";
386:      "cron_restartcmd" string => "/etc/init.d/cron restart";
387-
388-  processes:
389-
390-    !android.!windows::

But that init script is missing on SLES12 (systemd):

sles12:/var/rudder/cfengine-community/inputs # ll "/etc/init.d/cron" 
ls: cannot access /etc/init.d/cron: No such file or directory

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #4155: Commands to check and restart cron daemon on Fedora are not correctReleasedMatthieu CERDA2013-11-15Actions
Related to Rudder - Bug #7518: Promise types out of order in initial promises' promises.cfReleasedBenoît PECCATTE2015-11-30Actions
Actions #1

Updated by Benoît PECCATTE almost 9 years ago

  • Target version set to 2.10.14

Thank you for reporting.
This is indeed a bug.
But it should disapear after the agent gets its new promises from the server since the server generated promise use a generic service system to manage cron.

Actions #2

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 2.10.14 to 2.10.15
Actions #3

Updated by Alexis Mousset almost 9 years ago

  • Related to Bug #4155: Commands to check and restart cron daemon on Fedora are not correct added
Actions #4

Updated by Alexis Mousset almost 9 years ago

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

Updated by Alexis Mousset almost 9 years ago

  • Target version changed from 2.10.15 to 3.0.6

Targeting 3.0 as it affects Fedora 18, SLES 12 and Red Hat 7.

Actions #6

Updated by Alexis Mousset almost 9 years ago

  • Related to Bug #6735: cronConfiguration is not compatible with RHEL 7 and SLES 12 added
Actions #7

Updated by Alexis Mousset almost 9 years ago

  • Related to deleted (Bug #6735: cronConfiguration is not compatible with RHEL 7 and SLES 12)
Actions #8

Updated by Alexis Mousset almost 9 years ago

  • Parent task set to #6737
Actions #9

Updated by Alexis Mousset almost 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis Mousset to Matthieu CERDA
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/684
Actions #10

Updated by Alexis Mousset almost 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #11

Updated by Matthieu CERDA almost 9 years ago

Actions #12

Updated by Vincent MEMBRÉ almost 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.0.6 and 3.1.0~rc1 which were released on the 16th June 2015.

Actions #13

Updated by Jonathan CLARKE over 8 years ago

  • Related to Bug #7518: Promise types out of order in initial promises' promises.cf added
Actions

Also available in: Atom PDF