-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
containers create by Github workflow have wrong dockerMTU #1046
Comments
@erichorwath Hey. Please set dockerMTU appropriately as documented in https://github.com/actions-runner-controller/actions-runner-controller#additional-tweaks. Reading through all the docker-mtu related issues we had experienced https://github.com/actions-runner-controller/actions-runner-controller/issues?q=label%3A%22docker+mtu+issue%22+is%3Aclosed would also help. |
@mumoshu thanks for your quick reply! I have set the dockerMTU based on the documentation, which works perfectly fine EXCEPT for workflows where "container" is specified in the jobs section as described above. |
@erichorwath Hey. Thanks for your confirmation. For the remaining MTU issue for the service containers, the only rescue I'm aware of is the create a wrapper script for |
@mumoshu oh, that explains the problem! Which part of the coding is able to parse the correct MTU to the |
@erichorwath The problem is that neither actions runner nor docker sets the proper MTU on In the custom script, you auto-add MTU if the sub-command is Our runner image is build from https://github.com/actions-runner-controller/actions-runner-controller/blob/master/runner/Dockerfile. You'd need to add the custom script to the Dockerfile and build your own runner image out of it. A custom runner image can be specified via controller-manager's |
Hello, I've come across this issue as well since the Kubernetes network I'm setting up uses a smaller MTU (1420 instead of the usual 1500). Despite the MTU being configurable with the So, I followed-up on the workaround proposed by @FalconerTC here and changed it to support the sidecar dind container since
This has the added benefit of propagating whatever MTU is set on the default docker bridge, which works in both dind and docker in runner situations. I've pushed a docker image with the change to tiagomelo/github-actions-runner which basically places the script shim the docker container and propagate the docker MTU to newly created networks. However, since using containers in Github Actions is pretty common and - apparently - having Kubernetes overlay networks with MTUs smaller than 1500, I think this should be integrated in the official Meanwhile, this can be tested by creating a runner with the custom runner image:
You can validate this is working with:
within the runner:
Edit: Published a repository with the image under tiagoblackcode/github-actions-runner. |
Can this be reopened since the issue still persist? We're running into the same issue where we use dind and buildah to create container images. @tiagoblackcode Were you able to create a PR for this? |
@alexdepalex We aren't very eager to fix this on ARC side because we consider this as an issue in |
@tiagoblackcode Thanks for publishing a docker image containing the fix! I agree with @mumoshu, but at the same time I think it's a good idea to include the fix directly in |
I agree with the general sentiment that the issue is not in ARC but instead in However, since it seems we're kind of stuck on where to implement this, I suggest the following:
This way ARC users have a documented way to fix the issue while we wait for @mumoshu what are your thoughts on this? @NicklasWallgren regarding actions/runner#1650, instead of having an env variable I think it's better to inspect the bridge network, figure out its MTU and use it to create the network. Edit: There's an open PR in moby/moby#43197 to propagate the MTU set in |
@tiagoblackcode Yeah, you are probably right. I did suggest that as an alternative solution in the PR. |
This might be the most viable option 👍 Also, I'd greatly appreciate it if you folks mind helping me provide user support around this workaround in the future. Maybe- include some of you into |
I'm willing to help you with support. I'm gonna prepare a PR with the secondary image and regarding it in the next couple of days. |
Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (actions#1046)[actions#1046] and uses a separate image since there might be some unintended side-effects with this approach.
Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (actions#1046)[actions#1046] and uses a separate image since there might be some unintended side-effects with this approach.
Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (actions#1046)[actions#1046] and uses a separate image since there might be some unintended side-effects with this approach.
Hello, I finally had some time to work on this. Please check out #1201 which adds a new docker image to the repository that propagates the MTU setting to networks created in Github workflows. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (actions#1046)[actions#1046] and uses a separate image since there might be some unintended side-effects with this approach.
Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (actions#1046)[actions#1046] and uses a separate image since there might be some unintended side-effects with this approach.
Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (actions#1046)[actions#1046] and uses a separate image since there might be some unintended side-effects with this approach.
* feat: Add container to propagate host network MTU Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (#1046)[#1046] and uses a separate image since there might be some unintended side-effects with this approach. * fixup! feat: Add container to propagate host network MTU Co-authored-by: Yusuke Kuoka <[email protected]>
* feat: Add container to propagate host network MTU Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (#1046)[actions/actions-runner-controller#1046] and uses a separate image since there might be some unintended side-effects with this approach. * fixup! feat: Add container to propagate host network MTU Co-authored-by: Yusuke Kuoka <[email protected]>
* feat: Add container to propagate host network MTU Some network environments use non-standard MTU values. In these situations, the `DockerMTU` setting might be used to specify the MTU setting for the `bridge` network created by Docker. However, when the Github Actions workflow creates networks, it doesn't propagate the `bridge` network MTU which can lead to `connection reset by peer` messages. To overcome this, I've created a new docker image called `summerwind/actions-runner-mtu` that shims the docker binary in order to propagate the MTU setting to networks created by Github workflows. This is a follow-up on the discussion in (#1046)[actions/actions-runner-controller#1046] and uses a separate image since there might be some unintended side-effects with this approach. * fixup! feat: Add container to propagate host network MTU Co-authored-by: Yusuke Kuoka <[email protected]>
With the introduction of If we could specify The wrapper doesn't help for applications that use the docker API directly (like the dependabot-action network create) I'd be happy to do a PR if that seems like a valid option. |
Describe the bug
No network possible from Docker containers created by Github workflows (dind - Docker in Docker)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect that downloading files should work from docker containers.
If I manually start a docker container from the dind sidecar container -> no network problems:
Environment:
The text was updated successfully, but these errors were encountered: