Actions-runner-controller: DinD image not working

Created on 27 Jan 2021  路  4Comments  路  Source: summerwind/actions-runner-controller

Due to the changes in #253, the latest summerwind/actions-runner-dind images keeps crashing pods:

[Wed Jan 27 13:04:45 UTC 2021] [INFO] [/usr/local/bin/startup.sh] Starting supervisor
[Wed Jan 27 13:04:45 UTC 2021] [INFO] [/usr/local/bin/startup.sh] Waiting for processes to be running
[Wed Jan 27 13:04:45 UTC 2021] [INFO] [/usr/local/bin/startup.sh] Process dockerd is not running yet. Retrying in 1 seconds
[Wed Jan 27 13:04:45 UTC 2021] [INFO] [/usr/local/bin/startup.sh] Waited 0 seconds of 30 seconds
[Wed Jan 27 13:04:46 UTC 2021] [INFO] [/usr/local/bin/startup.sh] Process dockerd is not running yet. Retrying in 1 seconds
[Wed Jan 27 13:04:46 UTC 2021] [INFO] [/usr/local/bin/startup.sh] Waited 1 seconds of 30 seconds
[Wed Jan 27 13:04:47 UTC 2021] [INFO] [/usr/local/bin/startup.sh] dockerd is running
Github endpoint URL https://github.com/
/runner should be an emptyDir mount. Please fix the pod spec.

Setup:

  • actions-runner-controller: v0.16.1
  • summerwind/actions-runner-dind:v2.274.2 (OK)
  • summerwind/actions-runner-dind:v2.275.1 or latest (FAILS)

Most helpful comment

I ran into this as well.

It can be fixed/worked around by adding the following to each of your RunnerDeployment specs:

      volumeMounts:
       - mountPath: /runner
         name: runner
       volumes:
       - emptyDir: {}
         name: runner

All 4 comments

I ran into this as well.

It can be fixed/worked around by adding the following to each of your RunnerDeployment specs:

      volumeMounts:
       - mountPath: /runner
         name: runner
       volumes:
       - emptyDir: {}
         name: runner

Sure, that worked for me too, but wondering why this isn't done by the controller.

This is the working RunnerDeployment:

apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: foobar-group-runnerdeploy
spec:
  replicas: 2
  template:
    spec:
      organization: foo
      group: bar
      image: summerwind/actions-runner-dind:v2.274.2
      dockerdWithinRunnerContainer: true
      resources:
        limits:
          cpu: "4000m"
          memory: "2Gi"
        requests:
          cpu: "200m"
          memory: "200Mi"

...but this workaround is needed for the latest tag:

apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: foobar-group-runnerdeploy
spec:
  replicas: 2
  template:
    spec:
      organization: foo
      group: bar
      image: summerwind/actions-runner-dind:latest
      dockerdWithinRunnerContainer: true
      resources:
        limits:
          cpu: "4000m"
          memory: "2Gi"
        requests:
          cpu: "200m"
          memory: "200Mi"
      volumeMounts:
      - mountPath: /runner
        name: runner
      volumes:
      - name: runner
        emptyDir: {}

I got the same. Since #253 it is required to have a /runner directory mounted as emptyDir. The controller does not add these directories for dind images (or more specifically, when dockerdWithinRunnerContainer: true)

I think the emptyDir mount can be done regardless of when running in DinD mode or not. This is straightforward to add to the controller.

@mumoshu do you agree? (I don't understand all the intricacies of the fix you made in #253 though)

Edit: just looked at the code. It seems doable, though it's a little more involved than I had initially thought. Anyway, the workaround works great too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

callum-tait-pbx picture callum-tait-pbx  路  9Comments

sripberger picture sripberger  路  4Comments

vitobotta picture vitobotta  路  7Comments

BrendanGalloway picture BrendanGalloway  路  3Comments

kaykhancheckpoint picture kaykhancheckpoint  路  4Comments