Bug #6566
closedBug #6737: Make all techniques compatible with systemd changes
promises.cf's "bundle agent check_cron_daemon" is not systemd aware
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
Updated by Benoît PECCATTE over 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.
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.14 to 2.10.15
Updated by Alexis Mousset over 9 years ago
- Related to Bug #4155: Commands to check and restart cron daemon on Fedora are not correct added
Updated by Alexis Mousset over 9 years ago
- Status changed from New to In progress
- Assignee set to Alexis Mousset
Updated by Alexis Mousset over 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.
Updated by Alexis Mousset over 9 years ago
- Related to Bug #6735: cronConfiguration is not compatible with RHEL 7 and SLES 12 added
Updated by Alexis Mousset over 9 years ago
- Related to deleted (Bug #6735: cronConfiguration is not compatible with RHEL 7 and SLES 12)
Updated by Alexis Mousset over 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
Updated by Alexis Mousset over 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-techniques|df3f23b809b86e22cce3cfad823008f95a7cbfdb.
Updated by Matthieu CERDA over 9 years ago
Applied in changeset rudder-techniques|c3ca6462efc82c997770569652ffe5c74424d580.
Updated by Vincent MEMBRÉ over 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.
- Announcement 3.0 3.1
- Changelog 3.0 3.1
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Jonathan CLARKE almost 9 years ago
- Related to Bug #7518: Promise types out of order in initial promises' promises.cf added