Bug #4688
closedrudder agent is restarted by the cron job even if /opt/rudder/etc/disable-agent is present
Description
I get this message every run:
WARNING: The file /var/rudder/cfengine-community/last_successful_inputs_update is older than 10 minutes, the agent is probably stuck. Purging the TokyoCabinet lock file... Done
The cron job causing this, is the following:
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
However, the file does exist:
# if [ -e /opt/rudder/etc/disable-agent ]; then echo exist; else echo not exist; fi exist #
Updated by Vincent MEMBRÉ over 10 years ago
- Category set to System integration
- Status changed from New to Discussion
- Assignee set to Jonathan CLARKE
- Target version set to 2.6.13
I do really think that if /opt/rudder/disable-agent is present, check-rudder-agent should do nothing.
I think the easiest way is to start that script by a check and do nothing if the file is present.
What do you think of it Jon?
This can be upgraded by #4711
Updated by Nicolas CHARLES over 10 years ago
I do agree, but i'm going to fix this in 2.9 only, as we don't check the database in 2.6
Updated by Nicolas CHARLES over 10 years ago
- Status changed from Discussion to Pending technical review
- Pull Request set to https://github.com/Normation/rudder-packages/pull/344
Updated by Nicolas CHARLES over 10 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset packages:commit:16d1738a1191c0bf5dc81df2e3783bd47833582e.
Updated by Jonathan CLARKE over 10 years ago
Applied in changeset packages:commit:b04a3a6686bcd73a3eb657638acf51619f7e5c2b.
Updated by Vincent MEMBRÉ over 10 years ago
- Subject changed from /opt/rudder/etc/disable-agent ignored by cron job to rudder agent is restarted by the cron job even if /opt/rudder/etc/disable-agent is present
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.13 (announcement , changelog), 2.9.5 (announcement , changelog) and 2.10.1 (announcement , changelog), which were released today.
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Benoît PECCATTE about 9 years ago
- Target version changed from 2.6.13 to 2.9.7