Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DinD image not working #277

Closed
rofafor opened this issue Jan 27, 2021 · 5 comments
Closed

DinD image not working #277

rofafor opened this issue Jan 27, 2021 · 5 comments

Comments

@rofafor
Copy link
Contributor

rofafor commented Jan 27, 2021

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)
@wfarr
Copy link

wfarr commented Jan 27, 2021

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

@rofafor
Copy link
Contributor Author

rofafor commented Jan 27, 2021

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

@rofafor
Copy link
Contributor Author

rofafor commented Jan 28, 2021

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: {}

@reiniertimmer
Copy link
Contributor

reiniertimmer commented Feb 2, 2021

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.

@rofafor
Copy link
Contributor Author

rofafor commented Apr 25, 2021

Seems to be working with the current master now. I'm closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants