Skip to content

RunnerScaleSet in dind mode failing with startupProbe: Forbidden: may not be set for init containers without restartPolicy=Always error in controller #4144

Closed
@jlehoux-cvet

Description

@jlehoux-cvet

Checks

Controller Version

0.12.0

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. Deploy a AutoscalingRunnerSet using in dind mode with no customization to the template.spec parameters.

Describe the bug

AutoscalingRunnerSet gets created, but no runners pods are created. Controller has the following error in the logs:

ERROR EphemeralRunner Failed to create a pod due to unrecoverable failure {"version": "0.12.0", "ephemeralrunner": {"name":"","namespace":"arc-runners"}, "error": "Pod "" is invalid: spec.initContainers[1].startupProbe: Forbidden: may not be set for init containers without restartPolicy=Always"}

When i output the autoscalingrunnerset yaml on the cluster, it is wrong and has dind setup as an initcontainer:

spec:
  githubConfigSecret: github-auth-cvet-test
  githubConfigUrl: https://github.com/Cvet-test
  maxRunners: 3
  minRunners: 1
  runnerScaleSetName: cvet-test
  template:
    spec:
      containers:
      - command:
        - /home/runner/run.sh
        env:
        - name: DOCKER_HOST
          value: unix:///var/run/docker.sock
        - name: RUNNER_WAIT_FOR_DOCKER_IN_SECONDS
          value: "120"
        image: ghcr.io/actions/actions-runner:latest
        name: runner
        volumeMounts:
        - mountPath: /home/runner/_work
          name: work
        - mountPath: /var/run
          name: dind-sock
      initContainers:
      - args:
        - -r
        - /home/runner/externals/.
        - /home/runner/tmpDir/
        command:
        - cp
        image: ghcr.io/actions/actions-runner:latest
        name: init-dind-externals
        volumeMounts:
        - mountPath: /home/runner/tmpDir
          name: dind-externals
      - args:
        - dockerd
        - --host=unix:///var/run/docker.sock
        - --group=$(DOCKER_GROUP_GID)
        env:
        - name: DOCKER_GROUP_GID
          value: "123"
        image: docker:dind
        name: dind
        restartPolicy: Always
        securityContext:
          privileged: true
        startupProbe:
          exec:
            command:
            - docker
            - info
          failureThreshold: 24
          initialDelaySeconds: 0
          periodSeconds: 5
        volumeMounts:
        - mountPath: /home/runner/_work
          name: work
        - mountPath: /var/run
          name: dind-sock
        - mountPath: /home/runner/externals
          name: dind-externals
      restartPolicy: Never
      serviceAccountName: cvet-test-gha-rs-no-permission
      volumes:
      - emptyDir: {}
        name: dind-sock
      - emptyDir: {}
        name: dind-externals
      - emptyDir: {}
        name: work

Describe the expected behavior

Dind runners are successfully created

Additional Context

values.yaml:

githubConfigUrl: "https://github.com/Cvet-test"
containerMode:
  type: "dind"
minRunners: 1
maxRunners: 3
githubConfigSecret: github-auth-cvet-test
runnerScaleSetName: cvet-test

Controller Logs

https://gist.github.com/jlehoux-cvet/976db1e422825548496c1b8c558ab7a1

Runner Pod Logs

No runner is created, therefore there are no logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggha-runner-scale-setRelated to the gha-runner-scale-set modeneeds triageRequires review from the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions