2026-11-07: Act runner rollout held for 26 minutes, the act-cache sidecar ignored SIGTERM¶
Kind: reference (incident report)
Severity: warning · Status: resolved · Resolved by: operator agent · Duration: 0:10 from detection to resolution, 14:46:03–14:56:44 UTC (fault from 14:30:32, 26 min); reopened 15:49:33–16:05:30 by the fix's own rollout (fault from 15:34:08, 22 min) · Taskbase task: #2692
Summary¶
The first rollout of the CI runner pods since the act-cache sidecar was added (#2674) stalled.
The old pod on worker-1 had no jobs left, but it stayed Terminating because act_runner
cache-server does not stop on SIGTERM. Its replacement stayed Pending for 26 minutes and raised
KubePodNotReady. A SIGINT to the old act-cache ended the pod within 15 s. The fix in Git
passes SIGTERM on to the server as SIGINT.
The fix's own rollout (#1321) had to replace two pods that still ran the old act-cache, so it
stalled the same way and the alert fired again at 15:49:33. The same SIGINT, sent once each old
pod's runners had exited, ended both; the runner pods now all run the fixed act-cache.
Impact¶
- Services: Gitea Actions on hetzner-mgmt ran on one runner pod (two runner processes) instead of two, 14:30:32–14:56:44, and again 14:57:14–15:10:08 while the second pod was replaced.
- Users: CI jobs may have waited longer for a runner. No job failed because of it: the old pod had finished its last jobs at 14:18:00 and 14:22:41.
- Data: none.
- Duration: 10 min 41 s from the alert (14:46:03) to the new pod Ready (14:56:44); the
replacement had been
Pendingsince 14:30:33. - Reopened, the fix's rollout: one runner pod again 15:34:08–15:57:01 and 15:57:31–16:05:30.
At 15:56, 26 jobs of the
eloroorganization were waiting for a runner. No job failed because of it: no job was cut short, and the second old pod finished its three jobs before it was ended. 16 min from the alert (15:49:33) to the last new pod Ready (16:05:30).
Timeline¶
All times UTC.
| Time | Event | Source |
|---|---|---|
| 10:03:43 | ReplicaSet gitea-act-runner-86d5d74c6 created: the first runner pods with the act-cache native sidecar (#2674) |
kubectl get rs |
| 14:18:00, 14:22:41 | The last jobs on pod 86d5d74c6-t4jpt (worker-1) end: tasks 32553 and 32589 |
Gitea Actions tasks API |
| 14:20:25 | #1304 (#2676) merged: the runners prefer any worker but worker-2 | Git |
| 14:30:32 | Flux applies it: ReplicaSet 5788f45d88 created, t4jpt gets SIGTERM ("shutdown initiated, waiting 30m0s"); kubelet logs "Stopping container act-cache" |
runner logs, pod events |
| 14:30:33 | New pod 5788f45d88-rj27b Pending: "0/4 nodes are available: 1 node(s) had untolerated taint(s), 2 Insufficient ephemeral-storage, 2 Insufficient memory … preemption: not eligible due to preemptionPolicy=Never" |
pod events |
| 14:46:03 | Detected: KubePodNotReady for gitea/gitea-act-runner-5788f45d88-rj27b |
Alertmanager, task #2692 |
| 14:53:26 | The operator agent confirms the alert is firing and not silenced | Alertmanager API |
| 14:55 | Both runner containers of t4jpt already exited ("container not found"), dockerd has no containers; act-cache (PID 1 act_runner … cache-server) and dind still running |
kubectl exec |
| 14:56:19 | kill -INT 1 in t4jpt's act-cache |
operator agent |
| 14:56:35 | t4jpt gone; rj27b scheduled on worker-1 at 14:56:20 |
kubectl get pods |
| 14:56:44 | Resolved: rj27b Ready (4/4) |
pod conditions |
| 14:57:14 | The Deployment moves on: 86d5d74c6-cg4ln (worker-3) gets SIGTERM with two jobs running, 5788f45d88-gkpbl Pending |
kubectl get pods |
| 15:03 | Alertmanager has no KubePodNotReady alert |
Alertmanager API |
| 15:09:45 | kill -INT 1 in cg4ln's act-cache, after its runners had exited |
operator agent |
| 15:10:08 | gkpbl Ready on worker-3; Deployment 2/2 available |
pod conditions |
| 15:30:11 | #1321, the fix and this report, merged | Git |
| 15:34:08 | Flux applies it: ReplicaSet 86499cb8c8 created, 5788f45d88-gkpbl (old act-cache) gets SIGTERM, grace period until 16:05:48; 86499cb8c8-8wcqf Pending: "0/4 nodes are available: 1 Insufficient cpu, 1 node(s) had untolerated taint(s), 2 Insufficient ephemeral-storage, 3 Insufficient memory" |
pod events, runner logs |
| 15:44:09 | Deployment Progressing=False: ProgressDeadlineExceeded, "ReplicaSet … has timed out progressing." |
Deployment conditions |
| 15:49:33 | Detected again: KubePodNotReady for gitea/gitea-act-runner-86499cb8c8-8wcqf; task #2692 reopened |
Alertmanager, task #2692 |
| 15:55:29 | The operator agent confirms the alert is firing and not silenced | Alertmanager API |
| 15:56 | gkpbl: both runner containers exited, docker ps empty, no in-progress job on it in any organization; act_runner … cache-server still PID 1 |
kubectl exec, Gitea Actions jobs API |
| 15:56:38 | kill -INT 1 in gkpbl's act-cache |
operator agent |
| 15:57:01 | 8wcqf Ready on worker-3 (scheduled 15:56:39) |
pod conditions |
| 15:57:31 | The Deployment moves on: 5788f45d88-rj27b (worker-1, old act-cache) gets SIGTERM with three jobs running (34123, 34124, 34126), 86499cb8c8-s2qjn Pending |
runner logs, Gitea Actions jobs API |
| 16:04:40 | No in-progress job on rj27b left; both runner containers exited, docker ps empty |
Gitea Actions jobs API, kubectl exec |
| 16:05:06 | kill -INT 1 in rj27b's act-cache |
operator agent |
| 16:05:30 | Resolved: s2qjn Ready on worker-1 (scheduled 16:05:07); Deployment 2/2 available, 2 updated, 0 restarts |
pod conditions |
| 16:07:57 | Alertmanager has no KubePodNotReady alert and no active silence |
Alertmanager API |
Root cause¶
act_runner 0.6.1's main.go catches SIGINT and SIGTERM
(signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)). The
cache-server command never reads that context and returns only on SIGINT
(signal.Notify(c, os.Interrupt); <-c in internal/app/cmd/cache-server.go). The act-cache
container ran it with exec, as PID 1, so kubelet's SIGTERM was caught and dropped. Kubelet stops
native sidecars in reverse order, so dind gets SIGTERM only after act-cache has exited, and
the pod stayed Terminating until its 1900 s grace period ended (15:02:12 for t4jpt).
The runners avoid worker-2 since #2676, and worker-1 had no room for a second runner pod while the
old one still held its requests. So the new pod waited for the old one to go, as
Requests and rollouts
describes. That wait is meant to last as long as the old pod's jobs, up to 30 minutes. Here it
lasted the whole grace period, even though the jobs had ended 8 minutes before the SIGTERM. The
previous rollout (ReplicaSet 56b45b58f, 2026-11-05) had no act-cache, which is why this did
not show before.
What the agent did¶
- Alertmanager API
GET /api/v2/alerts?filter=alertname="KubePodNotReady"(port-forward tosvc/alertmanager-operated): one alert,active, not silenced; no active silence covers it. kubectl -n gitea get pods,deploy,rs,describe pod,get events: the new podPendingon requests, the old podTerminatingwithdeletionTimestamp15:02:12 (grace 1900 s), strategymaxSurge: 0,maxUnavailable: 1. Node allocation: worker-1 74 % of memory requests with the old pod, worker-2 91 %, worker-3 81 %.flux get kustomizations -A --status-selector ready=false: nothing.gitea-act-runnerReady.- Gitea Actions tasks API: the old pod's jobs 32553 and 32589 had ended (
success).kubectl exec … -c dind -- docker ps: no containers.kubectl exec … -c act-runner: "container not found" for both runners. Inact-cache,act_runner … cache-serverstill ran as PID 1. - Read act_runner v0.6.1's
main.goandinternal/app/cmd/cache-server.go: SIGTERM is caught, the server returns only on SIGINT. - Write:
kubectl -n gitea exec gitea-act-runner-86d5d74c6-t4jpt -c act-cache -- kill -INT 1— to end the stalled termination of a pod with no jobs left, and to check that SIGINT stops the server. Exit 0; 16 s later the pod was gone andrj27bwas scheduled on worker-1, Ready at 14:56:44. - Fix in Git, in this pull request: the
act-cacheshell stays PID 1, runs the server in the background and turns SIGTERM intokill -INT. Checked locally withsh(dash) andbashagainst a child that ignores SIGTERM and exits on SIGINT: the wrapper exits 0 within a second.kubectl kustomize components/gitea/act-runner | kubectl apply --dry-run=server -f -: accepted. - Pod
86d5d74c6-cg4ln(old spec) was still draining two jobs at 14:57:14 (tasks 32597 and 32619). The agent left it until both runner containers had exited anddocker pswas empty (15:09:36), so no job was cut short. - Write:
kubectl -n gitea exec gitea-act-runner-86d5d74c6-cg4ln -c act-cache -- kill -INT 1at 15:09:45 — the same stall, 19 minutes before its grace period ended (15:28:54). Exit 0; the pod was gone by 15:10:00, and5788f45d88-gkpblwas scheduled on worker-3 at 15:09:45 and Ready at 15:10:08, before it reached the alert's 15 minutes. Deployment 2/2 available, 0 restarts.
After the reopen at 15:49:33 (a later operator run of #2692):
- Alertmanager API, as in step 1: one
KubePodNotReadyalert,active, for86499cb8c8-8wcqf, not silenced. kubectl -n gitea get pods,describe pod,get deploy:8wcqfPendingon requests,5788f45d88-gkpblTerminating(deletion at 15:34:08, grace until 16:05:48), DeploymentProgressDeadlineExceeded.flux get kustomizations -A --status-selector ready=falseandflux get helmreleases -A --status-selector ready=false: nothing.gkpbl: runner logs show the shutdown at 15:34:08;kubectl exec … -c act-runner"container not found" for both runners,docker ps -aempty; the Gitea Actions jobs API (/orgs/{org}/actions/jobs?status=in_progress, every organization) lists no job on it.- Write:
kubectl -n gitea exec gitea-act-runner-5788f45d88-gkpbl -c act-cache -- kill -INT 1at 15:56:38 — the stall step 9 describes, 9 minutes before its grace period ended. Exit 0;8wcqfwas scheduled at 15:56:39 and Ready at 15:57:01. Itsact-cacheruns the fixed wrapper:shis PID 1,act_runner … cache-serverits child. rj27bgot SIGTERM at 15:57:31 with three jobs. The agent polled the jobs API until none ran on it (16:04:40), then checked that both runner containers had exited anddocker pswas empty.- Write:
kubectl -n gitea exec gitea-act-runner-5788f45d88-rj27b -c act-cache -- kill -INT 1at 16:05:06 — the same stall, 24 minutes before its grace period ended (16:29:11). Exit 0;s2qjnwas scheduled at 16:05:07 and Ready at 16:05:30. - State after: Deployment 2/2 ready and available on ReplicaSet
86499cb8c8,NewReplicaSetAvailable, 0 restarts;flux get kustomizations -A --status-selector ready=falseand the same for HelmReleases: nothing (agent-runnerswaited oncilium-config's routine reconcile until 16:06:36, then went Ready). Alertmanager at 16:07:57: noKubePodNotReadyalert, no active silence. - This report's update, in its own docs pull request.
Resolution and verification¶
rj27b Ready 4/4 at 14:56:44, gkpbl at 15:10:08; Deployment gitea-act-runner 2/2 available.
Alertmanager had no KubePodNotReady alert and no gitea alert at 15:10:58. The fix's
rollout replaced pods that still ran the old act-cache, and it stalled on each of them as
expected (from 15:34:08, alert from 15:49:33). After a kill -INT 1 in each old act-cache once
its runners had exited, 8wcqf was Ready at 15:57:01 and s2qjn at 16:05:30: Deployment
gitea-act-runner 2/2 available on ReplicaSet 86499cb8c8, both pods running the fixed
act-cache. Alertmanager had no KubePodNotReady alert at 16:07:57. The fix has not yet been seen
stopping a pod in the cluster: the next rollout of the runners is the first one whose old pods run
it, and should end each old pod as soon as its jobs end.
Follow-ups¶
-
2699 — the Mac mini's
runs the sameact-cacheDeployment (cluster/mac-mini/ci/overlay/deployment.yaml)¶exec act_runner … cache-server. With the default 30 s grace period it costs 30 s per restart rather than a stalled rollout.
References¶
- Alert:
KubePodNotReady, https://runbooks.prometheus-operator.dev/runbooks/kubernetes/kubepodnotready - Taskbase incident task: #2692
- Runs: the
operatorrun of #2692 - Pull requests: this report's pull request (the fix and the report); #1304 (#2676), the change
whose rollout showed it; #2674, which added
act-cache - Runbook sections: CI runners: Requests and rollouts
Open questions¶
- Why Flux applied #1304 ten minutes after the merge (14:20:25 → 14:30:32) is not settled by the record. The runners logged Gitea's database refusing connections at 14:19 and Gitea's HTTP refusing them at 14:30:30.