Repository navigation
ci: a runner down now blocks a release, a restart policy that would fail later warns (#1504) - #2116
bong-water-water-bong wants to merge 1 commit into
Conversation
… would fail later warns (engine#1504)
`ci-runner-health.sh` set `rc=1` for both kinds of failure, so scripts/weekly.sh's preflight could not tell them apart and
had to treat them the same. They are not the same:
* a runner that is not accepting jobs is an OUTAGE NOW -- every check that needs the box reads as pending for ever, and
that is the 11-08 shape the preflight exists for;
* since #2082 the same script also fails a unit that is `active/running` but whose restart policy would leave it down
after the next OOM kill. On this box the live units legitimately still carry those directives: switching them is
#1504's open owner item (item 2), not a fault of the release being cut.
So: exit 1 for "down now", exit **3** for "policy only", 0 for clean, 2 for "nothing to inspect" (unchanged). weekly.sh
blocks on 1 and warns on 3 -- a release that will not start until the owner switches the live units is a worse failure than
a loud warning that says exactly which directive is wrong.
Verified with a stubbed systemctl (SYSTEMCTL=<stub>, so no root and no real units), all three arms:
MODE=good (active/running, Restart=always, OOMPolicy=continue, MemoryMax set) -> rc=0
MODE=policy (same but Restart=no, OOMPolicy=stop, MemoryMax=infinity) -> rc=3
MODE=down (inactive/dead) -> rc=1
and `ci-runner-health.sh --self-test` still reports ok (15 cases).
Not stacked on #2091: that branch's base predates #2082, so it has no policy block to split -- building there would have
reproduced the stale-base trap. Both PRs touch this file (this one in the state/policy loop, #2091 in the --runs block), so
whichever lands second wants a rebase, not a hand-merge.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Closing as superseded — the same design landed at Main already has all of it: So the decision I "made" in the #2094 review — warn on policy-only, block on down-now, exit 3 — was made independently by the lane that owns the file, and merged. Two lanes reaching the same conclusion is reassuring about the conclusion and says nothing good about my process. Why I missed it, precisely, because the reason is reusable. My checks were:
The third check is one grep — Nothing else to salvage: my patch was the same two edits, so there is no residual to re-offer. |
|
VERDICT: READY at Why exit codes rather than messages
It is also the correct read of #1504's own history — the issue is "die on an OOM kill and stay dead", i.e. two facts (a kill happened; nothing restarted it), and only the second is a latent risk that a release can proceed past. A single "runner unhealthy" would have blocked the release for a condition that may never recur. The one thing I would pinIs "not accepting jobs" observed or configured? An outage is an observation (a probe that asks the runner, or a job that fails to be picked up) while a restart policy is a configuration (a unit property, Two small things: an arm for each exit code on fixture inputs (a static unit file plus a fabricated status), and the message for |
Refs #1504(a release blocker, row "self-hosted runners die on OOM and stay dead"). This is the half a lane can land: the preflight can now tell an outage from a latent risk, and treats them differently.The two failures that were sharing one exit code
scripts/ci-runner-health.shsetrc=1for both, soscripts/weekly.sh's preflight had to treat them the same — and #2094 (merged) fixed the sentence while leaving the verdict blunt:active/runningbut its restart policy would leave it down after the next OOM killThe change
Why warn and not block on 3 — the decision, made here rather than left open: switching the live units' directives is #1504's item 2, an owner action, not a fault of the release being cut. A release that will not start until the owner gets to it is a worse failure mode than a warning that names
Restart=no(want always)in the log. If the owner would rather block, it is one word inweekly.shand the exit code already distinguishes the case.Verified with a stubbed systemctl (no root, no real units touched)
Not stacked on #2091, deliberately
#2091 also edits this file (
--runs), and its base predates #2082 — so it has no policy block to split and I would have built on the stale-base trap that PR is currently sitting in (it is CONFLICTING for exactly that reason; comment on it). This branch is cut frommain, and both PRs touch different regions of the file, so whichever lands second wants a rebase rather than a hand-merge.