Skip to content

ENT-14108: cf-execd.service: drain cf-agent on stop (3.27.x)#6150

Open
larsewi wants to merge 1 commit into
cfengine:3.27.xfrom
larsewi:drain-cf-agent-systemd-3.27.x
Open

ENT-14108: cf-execd.service: drain cf-agent on stop (3.27.x)#6150
larsewi wants to merge 1 commit into
cfengine:3.27.xfrom
larsewi:drain-cf-agent-systemd-3.27.x

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented May 31, 2026

KillMode=process only signals cf-execd. Any cf-agent spawned by cf-execd keeps running after systemctl stop returns. A mid-run agent can then re-trigger cf-php-fpm (Wants=cf-postgres), causing dependencies to be pulled back in after the stop was reported successful.

This fix adds ExecStopPost= that waits up to 60s for cf-agent to drain, then SIGKILLs any survivor. It runs after cf-execd has exited, so no new agents are spawned during the drain.

Ticket: ENT-14108

Backported from #6146

`KillMode=process` only signals cf-execd. Any cf-agent spawned by
cf-execd keeps running after systemctl stop returns. A mid-run agent can
then re-trigger cf-php-fpm (`Wants=cf-postgres`), causing dependencies
to be pulled back in after the stop was reported successful.

This fix adds `ExecStopPost=` that waits up to 60s for cf-agent to
drain, then `SIGKILL`s any survivor. It runs after cf-execd has exited,
so no new agents are spawned during the drain.

Ticket: ENT-14108
Changelog: cf-execd systemctl stop now waits for in-flight cf-agent to finish
Signed-off-by: Lars Erik Wik <[email protected]>
(cherry picked from commit cd78895)
@larsewi
Copy link
Copy Markdown
Contributor Author

larsewi commented May 31, 2026

@cf-bottom Jenkins please :)

@cf-bottom
Copy link
Copy Markdown

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.

2 participants