Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MPF.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ When enabled, the policy will make sure that all units are enabled, unless they

**Description:** Disable a CFEngine Enterprise daemon component persistently.

`DAEMON` can be one of `cf_execd`, `cf_monitord` or `cf_serverd`.
`DAEMON` can be one of `cf_execd`, `cf_monitord`, `cf_reactor` or `cf_serverd`.

This will stop the AGENT from starting automatically.

Expand All @@ -645,7 +645,7 @@ This [augments file][Augments] will ensure that `cf-monitord` is disabled on hos
**Description:** Re-enable a previously disabled CFEngine Enterprise daemon
component.

`DAEMON` can be one of `cf_execd`, `cf_monitord` or `cf_serverd`.
`DAEMON` can be one of `cf_execd`, `cf_monitord`, `cf_reactor` or `cf_serverd`.

This [augments file][Augments] will ensure that `cf-monitord` is not disabled on `redhat`
hosts.
Expand Down
18 changes: 10 additions & 8 deletions cfe_internal/update/update_processes.cf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ bundle agent cfe_internal_update_processes
# state should be.
#
# By default all the relevant services will run on each host. For example all
# hosts will run cf-execd, cf-serverd, and cf-monitord. Individual services can
# be disabled:
# hosts will run cf-execd, cf-serverd, cf-monitord, and cf-reactor (when
# installed). Individual services can be disabled:
#
# * If persistent_disable_COMPONENT ( persistent_disable_cf_serverd,
# persistent_disable_cf_monitord) is defined the service will be disabled.
Expand Down Expand Up @@ -65,15 +65,17 @@ bundle agent cfe_internal_update_processes
"agent[cf_serverd]" string => "cf-serverd";
"agent[cf_monitord]" string => "cf-monitord";

"agent[cf_reactor]"
string => "cf-reactor",
if => fileexists("$(sys.bindir)/cf-reactor"),
comment => "cf-reactor is installed on all hosts since 3.29.0, older
clients may not have it";

policy_server.enterprise_edition::
"agent[cf_hub]"
string => "cf-hub",
comment => "cf-hub is only relevant on Enterprise hubs";

"agent[cf_reactor]"
string => "cf-reactor",
comment => "cf-reactor is only provided on Enterprise hubs";

systemd::
# On systemd hosts the cfengine3 service acts as an umbrella for other
# services.
Expand Down Expand Up @@ -269,7 +271,7 @@ bundle agent maintain_cfe_hub_process
###############################################################################
bundle agent disable_cfengine_agents(process)
# @brief Ensure cfengine component is not running
# @param process The name of the cfengine component binary to ensure not running. [cf-agent, cf-serverd, cf-monitord, cf-hub]
# @param process The name of the cfengine component binary to ensure not running. [cf-agent, cf-serverd, cf-monitord, cf-hub, cf-reactor]
{
vars:
!windows::
Expand Down Expand Up @@ -297,7 +299,7 @@ bundle agent disable_cfengine_agents(process)
###############################################################################
bundle agent enable_cfengine_agents(process)
# @brief Ensure cfengine component is running
# @param process The name of the cfengine component binary to ensure running. [cf-agent, cf-serverd, cf-monitord, cf-hub]
# @param process The name of the cfengine component binary to ensure running. [cf-agent, cf-serverd, cf-monitord, cf-hub, cf-reactor]
{
vars:
!windows::
Expand Down
1 change: 1 addition & 0 deletions cfe_internal/update/windows_unattended_upgrade.cf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ exit /B
REM kill all cf procs first so that installed can run
Taskkill /IM cf-execd.exe /F
Taskkill /IM cf-monitord.exe /F
Taskkill /IM cf-reactor.exe /F
Taskkill /IM cf-serverd.exe /F
Taskkill /IM cf-agent.exe /F
set bat="$(sys.workdir)$(const.dirsep)modules$(const.dirsep)packages$(const.dirsep)msiexec.bat"
Expand Down
6 changes: 5 additions & 1 deletion templates/cf-reactor.service.mustache
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[Unit]
Description=CFEngine Enterprise event reaction daemon
Description=CFEngine event reaction daemon
PartOf=cfengine3.service
ConditionPathExists={{{vars.sys.bindir}}}/cf-reactor
ConditionPathExists={{{vars.sys.default_policy_path}}}
After=syslog.target
After=network.target
{{#classes.enterprise_edition}}
{{#classes.policy_server}}

Wants=cf-postgres.service
After=cf-postgres.service
{{/classes.policy_server}}
{{/classes.enterprise_edition}}

[Service]
Type=simple
Expand Down
Loading