Skip to content

ENT-14463: Made cf-reactor read the policy periodically - #6360

Open
victormlg wants to merge 2 commits into
cfengine:masterfrom
victormlg:ENT-14463
Open

victormlg wants to merge 2 commits into
cfengine:masterfrom
victormlg:ENT-14463

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread cf-reactor/cf-reactor.c Fixed
Comment thread cf-reactor/cf-reactor.c Fixed
Comment thread cf-reactor/cf-reactor.c Fixed
Comment thread libpromises/generic_agent.c Fixed
Comment thread libpromises/generic_agent.c Fixed
@victormlg
victormlg force-pushed the ENT-14463 branch 2 times, most recently from 7c402fc to 635a21c Compare September 23, 2026 15:20
cf-reactor can now read agent and reactor bundles, and updates them periodically

ticket: ENT-14463
Signed-off-by: Victor Moene <victor.moene@northern.tech>
cf-reactor can now read policy from a specific input file

Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg marked this pull request as ready for review September 23, 2026 15:24

@craigcomstock craigcomstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few naming questions is all really.

Comment thread cf-reactor/cf-reactor.c
bool reload_policy = false;
if (config->agent_specific.daemon.last_validated_at < validated_at)
{
Log(LOG_LEVEL_VERBOSE, "New promises detected, reloading policy");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are checking only reactor bundles? It seems "new promises detected" is a bit vague? Maybe "reactor bundle changes detected"?

Comment thread cf-reactor/cf-reactor.c

if (!reload_policy)
{
Log(LOG_LEVEL_DEBUG, "No new promises found");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe "No policy changes seen by cf-reactor" or just leave the message out entirely?

Comment thread cf-reactor/cf-reactor.c

if (!GenericAgentArePromisesValid(config))
{
Log(LOG_LEVEL_INFO, "Reactor policy has errors, keeping the previous policy");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and further down, when you mention "Reactor policy" do you really mean reactor policy configuration aka "body reactor control"? It might be helpful to mention that more specifically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you referred to code in agent, execd, monitord doesn't mention this as specifically I think we could change those messages also in a different ticket/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants