EphemeralRunner 从未出现 runner pod 卡在永久镜像错误上等待的情况
作者: KR-Ravindra创建于 2026年9月14日更新于 2026年9月14日
Checks
- I've already read https://docs.GitHub.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/troubleshooting-actions-runner-controller-errors and I'm sure my issue is not covered in the troubleshooting guide.
- I am using charts that are officially provided
Controller Version
0.14.2 (same code path on master @ 03328aa14f6435462f6a2add1f5ba79247da6e09)
Deployment Method
Helm
Checks
- This isn't a question or user support case (For Q&A and community support, go to Discussions).
- I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
1. Install gha-runner-scale-set with a runner template whose runner container image can never be pulled, e.g.
`image: ghcr.io/actions/actions-runner:tag-that-does-not-exist`
(any of these give the same result: an invalid reference such as `ghcr.io/actions/actions-runner::bad` -> InvalidImageName;
`imagePullPolicy: Never` with the image absent on the node -> ErrImageNeverPull; a private image without a pull secret -> ImagePullBackOff).
2. Queue a workflow job targeting the scale set (or set minRunners: 1).
3. `kubectl get pods -n <runner ns>` shows the runner pod in `Pending` with STATUS `ImagePullBackOff` / `InvalidImageName` / `ErrImageNeverPull`.
4. Wait as long as you like (hours). Observe:
- the pod stays Pending; kubelet retries the pull forever (ImagePullBackOff) or never retries (InvalidImageName, ErrImageNeverPull);
- the EphemeralRunner stays in phase Pending/Running with `status.failures` empty;
- the controller log for that EphemeralRunner only repeats "Runner container is still running; updating ephemeral runner status";
- the queued job stays in "Waiting for a runner to come online"; the EphemeralRunnerSet counts the pod as pending capacity, so nothing else is scheduled for that slot.
5. Compare with a runner template whose *init container* fails: that pod is deleted, `status.failures` grows, and after maxFailures the EphemeralRunner is recreated / surfaced.
### Describe the bug
The `EphemeralRunner` reconciler classifies the runner container purely by `Terminated` vs. not-`Terminated`. A pod whose runner container is stuck in `Waiting` because the image can never be pulled is indistinguishable, to the controller, from a healthy running runner:
- https://GitHub.com/actions/actions-runner-controller/blob/03328aa14f6435462f6a2add1f5ba79247da6e09/controllers/actions.GitHub.com/ephemeralrunner_controller.go#L332-L333 — `cs := runnerContainerStatus(pod)` then `switch { ... }`
- …内容来源: actions/actions-runner-controller