Project

General

Profile

Actions

Bug #3794

closed

"disable-agent" feature does not work as expected (doesn't stop *running* agents)

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

Status:
Released
Priority:
2
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

As described in #3727, the /opt/rudder/etc/disable-agent file can be touched to disable the agent from being *re*started once it's stopped.

This is confusing, as it's name implied that the agent would actually be stopped, but it is not.

We should adapt this, maybe using some code like this (and setting "disable_agent" as an abortclass):

  classes:
    "should_disable_agent" expression => fileexists("${g.rudder_base}/etc/disable-agent");
    "disable_agent" 
      expression => "should_disable_agent",
      ifvarclass => "abort_report_done";

  processes:
    "cf-execd, cf-serverd, cf-monitord" 
       attributes => kill them;

  reports:
    should_disable_agent::
      "Report saying OMG the server and executor have been stopped, and the agent is going to be killed!" 
         classes => if_ok("abort_report_done");


Related issues 1 (0 open1 closed)

Related to Rudder - Architecture #3727: The cfengine processes management in system technique is splitted in various placesRejectedActions
Actions

Also available in: Atom PDF