Skip to content

failed ephemeral runners are not being automatically deleted upon failure #4258

Closed

Description

@sravula84

Checks

Controller Version

0.10.1

Helm Chart Version

0.10.1

CertManager Version

1.8

Deployment Method

Helm

cert-manager installation

Hi Team,
we are using gha runner scale sets
We’ve observed that when there's an issue with the runner scale sets, all ephemeral runners enter a failed state, and new runners are unable to be created. However, once we manually delete the failed ephemeral runners, the runner pods are able to be created successfully.

Could you please advise why the failed ephemeral runners are not being automatically deleted upon failure?

Checks

  • This isn't a question or user support case (For Q&A and community support, go to Discussions. It might also be a good idea to contract with any of contributors and maintainers if your business is so critical and therefore you need priority support
  • I've read releasenotes before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
  • My actions-runner-controller version (v0.x.y) does support the feature
  • I've already upgraded ARC (including the CRDs, see charts/actions-runner-controller/docs/UPGRADING.md for details) to the latest and it didn't fix the issue
  • I've migrated to the workflow job webhook event (if you using webhook driven scaling)

Resource Definitions

template:
  spec:
    initContainers:
    - name: init-dind-externals
      image: us-docker.pkg.dev/prosper-prod-registry/images/actions-runner:latest
      command: ["cp", "-r", "-v", "/home/runner/externals/.", "/home/runner/tmpDir/"]
      volumeMounts:
        - name: dind-externals
          mountPath: /home/runner/tmpDir
    containers:
    - name: runner
      image: ghcr.io/actions/actions-runner:latest
      command: ["/home/runner/run.sh"]
      env:
        - name: DOCKER_HOST
          value: unix:///var/run/docker.sock
      volumeMounts:
        - name: work
          mountPath: /home/runner/_work
        - name: dind-sock
          mountPath: /var/run
    - name: dind
      image: docker:dind
      args:
        - dockerd
        - --host=unix:///var/run/docker.sock
        - --group=$(DOCKER_GROUP_GID)
      env:
        - name: DOCKER_GROUP_GID
          value: "123"
        - name: DOCKER_IPTABLES_LEGACY
          value: '1'
      securityContext:
        privileged: true
      volumeMounts:
        - name: work
          mountPath: /home/runner/_work
        - name: dind-sock
          mountPath: /var/run
        - name: dind-externals
          mountPath: /home/runner/externals
    volumes:
    - name: work
      emptyDir: {}
    - name: dind-sock
      emptyDir: {}
    - name: dind-externals
      emptyDir: {}

To Reproduce

when no runners registered to GitHub
run k get empheralrunners
see all the runners in failed status
forcefully delete 
then we can see new runners in running status

Describe the bug

the failed ephemeral runners are not being automatically deleted upon failure?

Describe the expected behavior

the failed ephemeral runners should being automatically deleted upon failure?

Whole Controller Logs

resource: {2}
severity: "ERROR"
textPayload: "2025-09-20T18:50:45Z	INFO	EphemeralRunner	Updating ephemeral runner status to track the failure count	{"version": "0.10.1", "ephemeralrunner": {"name":"prosper-linux-prod-wsrk2-runner-x86p2","namespace":"prosper-gha-runners"}}"
timestamp: "2025-09-20T18:50:45.923457829Z"

Whole Runner Pod Logs

resource: {2}
severity: "ERROR"
textPayload: "2025-09-20T18:50:45Z	INFO	EphemeralRunner	Updating ephemeral runner status to track the failure count	{"version": "0.10.1", "ephemeralrunner": {"name":"prosper-linux-prod-wsrk2-runner-x86p2","namespace":"prosper-gha-runners"}}"
timestamp: "2025-09-20T18:50:45.923457829Z"

Additional Context

No response

Activity

  1. added
    bug
    needs triage
    community
    on Sep 23, 2025
  2. nikola-jokic commented on Sep 23, 2025

    @nikola-jokic
    Collaborator

    This is intentional by design, although no longer a blocker in the 0.12.1 release.
    The purpose was to:

    1. Reduce the number of requests issued to the server if the spec is wrong
    2. Leave the ephemeral runner hanging so you can inspect the latest failure and fix it properly.

    This is no longer the case; the runner will enter the failed state only if the pod definition is wrong. Otherwise, it will be restarted with the back-off mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcommunityneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions