Actions
Bug #3794
closed"disable-agent" feature does not work as expected (doesn't stop *running* agents)
Pull Request:
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");
Actions