Actions
Bug #5735
closedThe rudder-agent cron is unreadable and error prone
Pull Request:
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
Updated by Benoît PECCATTE about 10 years ago
- Category set to System integration
- Target version set to 3.0.0~beta1
Updated by Jonathan CLARKE about 10 years ago
- Status changed from New to Rejected
This has already been changed in #5391, rejecting.
Actions