Project

General

Profile

Actions

User story #2884

closed

File to disable rudder-agent on a node

Added by Jonathan CLARKE over 11 years ago. Updated about 9 years ago.

Status:
Released
Priority:
3
Category:
Packaging
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

Currently, it's pretty damn hard to stop rudder-agent (cf-agent) on a node if you want to, because:
  1. The CFEngine policy checks the cf-execd and cf-serverd processes and starts them if they're not running
  2. 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.


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #2792: During a migration from 2.3.8 to 2.4.0~beta3, rudder-agent postinst can display some errors when copying CFEngine binariesReleasedJonathan CLARKE2012-08-09Actions
Actions #1

Updated by Nicolas CHARLES over 11 years ago

Isn't it the

/var/rudder/share/root/stopFile
file ?
However it does not prevent update of promises from the server, hence it can be deleted by a policy update

Actions #2

Updated by Jonathan CLARKE over 11 years ago

Note: at some point, this could be integrated with the red button feature, when it gets re-implemented (see #2062)

Actions #3

Updated by Jonathan CLARKE over 11 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).

Actions #4

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from 2 to Pending technical review
  • % Done changed from 0 to 100

Applied in changeset commit:c3e5aeba86ae40e21be4daf2c5822d5839647d82.

Actions #5

Updated by Nicolas CHARLES over 11 years ago

  • Status changed from Pending technical review to 10

This looks valid, thank you Jon

Actions #6

Updated by Nicolas CHARLES over 11 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

Actions #7

Updated by Nicolas CHARLES over 11 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 90 to 100

Applied in changeset commit:ce3a76880009761c4ea5d9bdadeae98a9dce79aa.

Actions #8

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from Pending technical review to 10

Looks good to me, thanks Nico.

Actions #9

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from 10 to Released
Actions #10

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.4.0~rc1 to 2.4.0~beta5
Actions #11

Updated by Nicolas PERRON about 11 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #12

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF