You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A cancel before the unit exists stops nothing #1971
bugSomething isn't workingcomponent/agentinternal/agent: jobs, facts, drain, preflight, enrollmentside-findingFound during work on a different subject, and filed so that work stays its size
The root broker stops the transient unit of a call or a step when the agent closes the connection, for example because its job was cancelled (Server.run calls Stop). If the agent closes the connection before systemd has created the unit, the stop finds no unit: systemctl stop exits 5, "Unit … not loaded.". systemd-run then creates the unit, and nothing stops it. The call or the step runs until its RuntimeMaxSec=, which is 5 minutes, or 30 minutes for the apt calls and the image pull and docker create steps. That is work that nobody waits for.
Since #1943 (764f368), StopUnit takes exit 5 as stopped (#1962), so this is no longer logged as an error. Before, it was an error, but the unit still ran. The gap is older than #1943.
After the cancel, the broker waits until the unit exists or systemd-run returns, then stops the unit. For example: when a stop exits 5 and systemd-run still runs, try the stop again on the next tick of the watch, until systemd-run returns.
bugSomething isn't workingcomponent/agentinternal/agent: jobs, facts, drain, preflight, enrollmentside-findingFound during work on a different subject, and filed so that work stays its size
Activity
retr0h commentedon Dec 6, 2026
The D-Bus rework in #1972 closes this by design.