User story #2884
closedFile to disable rudder-agent on a node
Description
- The CFEngine policy checks the cf-execd and cf-serverd processes and starts them if they're not running
- A cron job runs every 5 minutes to check that cf-execd is running and starts it if not
Some times, we want to stop cf-agent for a good reason (ie, running a test, or during an upgrade like in #2792).
It would be good to be able to touch a file that would just disable all these checks, for example /opt/rudder/etc/disable-agent.
Updated by Nicolas CHARLES over 12 years ago
Isn't it the
/var/rudder/share/root/stopFilefile ?
However it does not prevent update of promises from the server, hence it can be deleted by a policy update
Updated by Jonathan CLARKE over 12 years ago
Note: at some point, this could be integrated with the red button feature, when it gets re-implemented (see #2062)
Updated by Jonathan CLARKE over 12 years ago
Nicolas CHARLES wrote:
Isn't it the [...] file ?
However it does not prevent update of promises from the server, hence it can be deleted by a policy update
Ah, yes, great minds think alike ;-)
Yes and no - the files have different meanings currently. The file I'm talking about would completely stop CFEngine on the host, including policy servers, so the whole red button mechanism wouldn't work (ie, the red button is distributed from the root server, via relay servers, so if CFEngine is stopped there, it never gets propagated). This is more for system-level work.
Although, as I said, there is certainly some level of integration to be done (ie one probably implies the other).
Updated by Jonathan CLARKE over 12 years ago
- Status changed from 2 to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:c3e5aeba86ae40e21be4daf2c5822d5839647d82.
Updated by Nicolas CHARLES over 12 years ago
- Status changed from Pending technical review to 10
This looks valid, thank you Jon
Updated by Nicolas CHARLES over 12 years ago
- Status changed from 10 to In progress
- % Done changed from 100 to 90
Actually, there is an error in the regular expression :
Regular expression error "range out of order in character class" in expression "0,5,10,15,20,25,30,35,40,45,50,55 * * * * root if [ `ps -efww | grep cf-execd | grep "/var/cfengine/bin/cf-execd" | grep -v grep | wc -l` -eq 0 ]; then /var/cfengine/bin/cf-execd; fi" at 72 Regular expression error "range out of order in character class" in expression "0,5,10,15,20,25,30,35,40,45,50,55 * * * * root if [ `ps -efww | grep cf-execd | grep "/var/rudder/cfengine-community/bin/cf-execd" | grep -v grep | wc -l` -eq 0 ]; then /var/rudder/cfengine-community/bin/cf-execd; fi" at 72
Updated by Nicolas CHARLES over 12 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 90 to 100
Applied in changeset commit:ce3a76880009761c4ea5d9bdadeae98a9dce79aa.
Updated by Jonathan CLARKE over 12 years ago
- Status changed from Pending technical review to 10
Looks good to me, thanks Nico.
Updated by Nicolas PERRON about 12 years ago
- Target version changed from 2.4.0~rc1 to 2.4.0~beta5
Updated by Nicolas PERRON almost 12 years ago
- Project changed from Rudder to 34
- Category deleted (
11)
Updated by Benoît PECCATTE almost 10 years ago
- Project changed from 34 to Rudder
- Category set to Packaging