Project

General

Profile

Actions

Bug #5735

closed

The rudder-agent cron is unreadable and error prone

Added by Benoît PECCATTE over 9 years ago. Updated over 9 years ago.

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

Description

The rudder agent cron currently contains this line :

0,5,10,15,20,25,30,35,40,45,50,55 * * * * root . /etc/profile; if [ -e /opt/rudder/bin/check-rudder-agent ]; then /opt/rudder/bin/check-rudder-agent; else if [ ! -e /opt/rudder/etc/disable-agent -a `ps -efww | grep -E "(cf-execd|cf-agent)" | grep -E "/var/rudder/cfengine-community/bin/(cf-execd|cf-agent)" | grep -v grep | wc -l` -eq 0 ]; then /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf >/dev/null 2>&1 && /var/rudder/cfengine-community/bin/cf-agent >/dev/null 2>&1; if [ $? != 0 ]; then if [ -f /opt/rudder/etc/rudder-restart-message.txt ]; then cat /opt/rudder/etc/rudder-restart-message.txt; else echo "Rudder agent was unable to restart on $(hostname)."; fi; fi; fi; fi

It's unreadable and probably contains errors.
A cron should be a simple command line. If needed, add a script that is called by the cron.
Why not use a rudder agent command for that

Actions #1

Updated by Benoît PECCATTE over 9 years ago

  • Category set to System integration
  • Target version set to 3.0.0~beta1
Actions #2

Updated by Jonathan CLARKE over 9 years ago

  • Status changed from New to Rejected

This has already been changed in #5391, rejecting.

Actions

Also available in: Atom PDF