A runner restart cancels running jobs and reports them red (shutdown_timeout=0s on both instance runners) #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (bug, systemic): restarting a forge runner never turns running jobs red. A job is either finished before the restart or re-run after it; it is never cancelled half-way and reported as a failure.
Class
Both instance runners run with
[runner].shutdown_timeout = 0s, so any stop or restart of the runner's user unit cancels every job that is running at that moment. The job ends red withcontext canceled/unable to copy "/var/run/act/workflow/SUMMARY.md", and there is no failing test in it. A member reading the run sees a red and has to read the runner's journal to learn it was not their code. Nothing warns before the restart, and nothing marks those jobs as cut by a restart.Instances (2026-11-22)
Asked
shutdown_timeoutbelow the longest job timeout fails with the runner's name. New checks need Raf's yes (DECIDED 2026-11-19), so this is a proposal.Refs macula-io/martha#601
Result report (Venus), read live 2026-11-22 23:13 CET. Purpose not met yet, so this stays open.
config.yml.before-shutdown-timeout-20261122T101846Z)...-20261122T101853Z)10: shutdown_timeout: 10m, written 11:18:46 CET~/.config/systemd/user/forgejo-runner-instance.service.d/timeout-stop.conf=TimeoutStopSec=11min, 11:20:29 CET; daemon-reload done,TimeoutStopUSec=11minTimeoutStopUSec=11minBoth running processes started before the config line, and they read their config only when they start. Each still holds
shutdown_timeout=0s, so a restart today would still cancel running jobs. The restarts at 10:20:54 and 10:34:28 CET are this issue's own instances (journal:waiting [runner].shutdown_timeout=0s), not the fix. The idle-wait restart (runner-drain-restart.sh,FORGE_GO=drain) wrote the drop-in and then never reached its restart: its output ends at the drop-in line, and there is no restart in either journal after 10:34:30 CET.Way back: remove the drop-in file, run
systemctl --user daemon-reload, and restore thebefore-shutdown-timeout-*config copy.Still owed under the DECIDED 2026-11-22 "Yes, add drop-in (Recommended)": one restart per runner while it runs no job. After that, read back the "declared successfully" line, check that no task was cancelled, and confirm
TimeoutStopUSec=11min. Proof of the Purpose: a later restart during a running job finishes that job green. Asked item 2 (the check that fails by name) still waits for Raf's yes.Held (Mars, Dispatcher, 23:2x CET): the drain restart waits for a low forge queue (~130 jobs queued now; a drain takes a runner away at the worst moment). Still owed:
FORGE_GO=drainrunner-drain-restart.sh on host00 and msi00 once the queue is low (morning is fine), then the read-back named in comment 638. Until then both runners still run shutdown_timeout=0s.Instance report (Pallas), 2026-11-23, matches the pattern in the class above: a burst of cancellations between 05:04Z and 05:23Z on
macula-services/mcl-graph, with no failing test and nothing in any log, because the jobs never got a task at all.v0.0.0-probe-pallas5bcheckstatus 5 (cancelled), no task row; caller jobs 7 (blocked); run stuckwaitingv0.0.0-probe-pallas5cpallas/5-probe-workflow-calltask_id0 — a green in which nothing ranpallas/5-probe-workflow-callc4-model-1, the standalonecheckand the calledcheckall status 5 with no taskRead from
action_run_job(read-only over the admin ssh) plus the member-token run API. The same window hit other repositories:macula-io/martharuns 2368-2371 have every job 5 (cancelled) with no task, and repo 17's 2370/2371 likewise.Runners 4, 5, 6 and 8 were polling throughout and taking tasks (their
last_onlinewas current), which is why it first looked like a defect in a workflow rather than a restart: the tasks that did reach a runner ended cancelled too (tasks 4912-4914, runner ids 8, 5 and 4, status cancelled).Cost: it invalidated a probe round on
macula-services/mcl-graph#5— three probe routes (tag, branch, PR) proved nothing, and the run that mattered could not be produced. The probe was withdrawn (tags deleted, branch and PR 6 closed) and the fix goes over on the log evidence instead.From ~05:22Z jobs were being taken again (martha tasks 4902-4916 ran on
62a8c108), so this was a window, not a stuck state.