Repository navigation
Closed
Labels
Description
Checks
- I've already read https://github.com/actions/actions-runner-controller/blob/master/TROUBLESHOOTING.md and I'm sure my issue is not covered in the troubleshooting guide.
- I'm not using a custom entrypoint in my runner image
Controller Version
0.27.2
Helm Chart Version
0.23.0
CertManager Version
No response
Deployment Method
Helm
cert-manager installation
Yes
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
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: xxx
spec:
replicas: 1
template:
spec:
labels:
- self-hosted
- linux
- xxx
organization: xxx
resources: {}To Reproduce
1. Upgrade runner-controller to summerwind/actions-runner-controller:v0.27.2
2. Create a runner
3. Watch runner container logsDescribe the bug
After an upgrade of runner-controller to v0.27.2, an error is thrown in runner:
runner Got permission denied while trying to connect to the Docker daemon socket at unix:///run/docker/docker.sock: Get "http://%2Frun%2Fdocker%2Fdocker.sock/v1.24/containers │
│ /json": dial unix /run/docker/docker.sock: connect: permission denied
which prevents it from ever picking up a Github job to work on.
Same runner works fine in v0.27.1, v0.27.0, v0.26.0
Describe the expected behavior
An error not to be thrown, and runner to pick up a job from Github like it did in v0.27.1 and below
Whole Controller Logs
Nothing of interest in the logs:
2023-04-06T10:45:30Z DEBUG runner Runner appears to have been registered and running. {"runner": "yy/xxxx-gbw9x-md9pg", "podCreationTimestamp": "2023-04-06 10:4 │
│ 5:27 +0000 UTC"}
The pod is up technically but the runner container is failing internally.Whole Runner Pod Logs
Got permission denied while trying to connect to the Docker daemon socket at unix:///run/docker/docker.sock: Get "http://%2Frun%2Fdocker%2Fdocker.sock/v1.24/containers/json": dial unix /run/docker/docker.sock: connect: permission deniedAdditional Context
GKE 1.24.
Same runners work in v0.27.1 and below (tried v0.27.0 and v0.26.0 as well).
Possibly a consequence of #2324 ? Not sure, didn't have time to dig in further. I reverted controller to v0.27.1.
v0.27.2 upgrade was important because of failing metrics server on versions below v0.27.2 (fix was added in that version).
Reacted by Lukas H., Paul Bourke, Thomas B., Jacopo Spolverati, allanhung, cavila-evoliq, Caio Tavares, Alexej Disterhoft, Andrew Regan, Tal Efraim and 22 more
Activity
github-actions commentedon Apr 6, 2023
Hello! Thank you for filing an issue.
The maintainers will triage your issue shortly.
In the meantime, please take a look at the troubleshooting guide for bug reports.
If this is a feature request, please review our contribution guidelines.
totogtr commentedon Apr 6, 2023
Experiencing the same issue, had to rollback to v0.27.1 as well.
alexklibisz commentedon Apr 6, 2023
Experienced the same issue on:
Logs show:
All works fine on chart version 0.23.0, controller 0.27.1, same runner.
Atsoamazed commentedon Apr 6, 2023
Was able to get pass this error by setting
dockerdWithinRunnerContainer: trueIn the runnerdeployment manifest
asonnleitner commentedon Apr 7, 2023
Same
roulettedares commentedon Apr 8, 2023
same issue on GKE 1.24.
mumoshu commentedon Apr 10, 2023
I greatly appreciate your detailed report @Tyrion85!
Yeah, it could be! Let me reproduce it first.
To be clear, it didn't happen on my env when I E2E-tested it before releasing v0.27.2 so I'm pretty unsure how I could reproduce it!
In the meantime, everyone, I'd appreciate it if you could bring any more details than "me too"!
Is this happening only on GKE?
Hey @asonnleitner @Atsoamazed @alexklibisz 👋Thanks for reporting. Are you using GKE? If so, which K8s versions are you using?
vanhtuan0409 commentedon Apr 10, 2023
somehow with
v0.27.2,DOCKER_HOSTenv var changed tounix:///run/docker/docker.sockinstead of usingtls://.Combination with docker group id mismatch between runner container and docker container resulted in the above permission denied error
Currently we have 2 workaround:
dockerdWithinRunnerContainer: trueto make both runner and docker run in the same container as @Atsoamazed mentioned abovemumoshu commentedon Apr 10, 2023
@vanhtuan0409 Hey! Thanks a lot for the info. I'm now confused why the GID envvar had to be set to 1001 in your case. I thought our runner images use 121-
https://github.com/search?q=repo%3Aactions%2Factions-runner-controller%20DOCKER_GROUP_GID&type=code
It's plausible to use 121 as the default DOCKER_GROUP_GID as we've done in#2324, right...?
vanhtuan0409 commentedon Apr 10, 2023
it seems like there is some issue in the docker publish pipeline. The controller is currently using docker hub image, which will have docker gid set to 1001
you can easily check on dockerhub with this link https://hub.docker.com/layers/summerwind/actions-runner/latest/images/sha256-202c64d20e5a35511eb541df7e6d72fd7e415d712c669a4783f48bd39c70fc68?context=explore
or by running a simple container for inspection

asonnleitner commentedon Apr 10, 2023
@mumoshu I actually use EKS 1.25
nobbs commentedon Apr 10, 2023
The Ubuntu 22.04 one has the gid set to 121,
actions-runner-controller/runner/actions-runner.ubuntu-22.04.dockerfile
Line 12 in b86af19
The one base on Ubuntu 20.04 has not
actions-runner-controller/runner/actions-runner.ubuntu-20.04.dockerfile
Line 14 in b86af19
Anyway, had the same issues on a on-prem cluster based on Rancher / RKE1.
mumoshu commentedon Apr 10, 2023
@nobbs Ahhh got it...! Thank you so much for pointing it out!! That must be the cause.
Presuming many folks are still stuck in Ubuntu 20.04, shall we let ARC use 1001 by default, and use 121 only when the image tag contains "22.04"?
7 remaining items
torokati44 commentedon Apr 14, 2023
I was also affected by this, and the
DOCKER_GROUP_GIDenvvar workaround worked for me as well.mrparkers commentedon Apr 14, 2023
I tried this approach too. I believe that this won't work unless the symlinked directory is also mounted to the container, meaning I would have to also mount
/var/run/dockertoo. I don't think there's an easy way to do this across my entire GitHub org, I'd probably have to update individual jobs to mount these directories manually. This seems like a worse solution than simply remaining on v0.27.1 for now.mumoshu commentedon Apr 15, 2023
Hey everyone! #2499 should generally fix this. Could you read the description of #2499 and confirm that you'll no longer be affected by this issue after that? Thanks!
nobbs commentedon Apr 15, 2023
I've tried your fix and at least I don't face any issues with the default Ubuntu 20.04/22.04 runners anymore. Thanks!
nobbs commentedon Apr 16, 2023
Regarding the issue reported by @mrparkers in #2490 (comment), I can replicate that, too.
Using the default runners with sidecar dind, the docker socket is now available on
/var/run/docker/docker.sockinstead of/var/run/docker.sockpotentially breaking dockerfile based actions if they try to use docker from inside the Dockerfile based action. I don't think that this can be solved by modifying actions or anything, as the action runner constructs the arguments it sets for thedocker runcalls when using Dockerfile based actions.The sidecar-less setup with dind still works as expected as the
/var/run/docker.sockis available.My guess is, that #2324 introduced this change in this block: https://github.com/milas/actions-runner-controller/blob/480a83d90d5b81a10b92a7a61d7cc8b4973655cc/controllers/actions.summerwind.net/runner_controller.go#L1005-L1032
fix(apps/actions-runner-controller): downgrade to `0.23.0`
Fix docker.sock permission error for non-dind Ubuntu 20.04 runners si…
Bump chart version to v0.23.2 for ARC v0.27.3
Bump chart version to v0.23.2 for ARC v0.27.3 (#2514)
torokati44 commentedon Apr 17, 2023
Can confirm, v0.27.3 fixed the problem for me as well.
Thank you!
mrparkers commentedon Apr 17, 2023
I have opened another issue for the problem that I detailed above, which is still not resolved in v0.27.3: #2519
Try out solution for Runner docker issue
Fix docker.sock permission error for non-dind Ubuntu 20.04 runners si…
Bump chart version to v0.23.2 for ARC v0.27.3 (actions#2514)