-
Notifications
You must be signed in to change notification settings - Fork 963
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
Allow to specify docker network options, such as mtu #775
Comments
Hello @sharonovd .. The lack of possibility to set MTU has bit me hard the past few days. Is there any progress on this front? Any workarounds available today to pass custom options at the |
Hack'ish workaround: if you are creating your own runners, like us, You can wrap every call to
Not a pretty hack - but it works :) |
Thanks for the hack! This was breaking pretty consistently for me, so I ended up up'ing the VPC MTU to 1500. Glad GCP allows that now. Things are OK for me now. |
Thanks for the workaround!, we encountered the same issue using k3s and default flannel configuration. |
Instead of applying all these hacks and using non-official container image (although thanks for making that available @tiagoblackcode), can we get this fixed in the runner itself? Seems like it comes down to checking the MTU from the network bridge and using that when creating the network. |
Hi, we've encountered the same issue and are unfortunately having to use the work around. Would be excellent to see some more flexibility in the form of allowing options to be configured/passed (or just an MTU, as in #1650) when creating Docker networks for workflows jobs. |
In the README it specifies the option to pass an optional MTU to the
Is this not what you need? I ended up here because I am noticing network performance issues when when running Github Actions in these self-hosted pods (on GKE). Sometimes a job takes 5 minutes, and other times it takes 15 minutes. I am currently verifying if MTU is indeed the problem (since the VPC has a MTU of 1460 and Docker default is 1500). |
@mzwennes ProblemThe problem is that the Runner creates custom networks. When doing so, it does not honor the MTU settings in the Docker daemon config file. Thus, all networks it creates are at Docker's default MTU setting ( This is particularly an issue for those on GKE who use the actions/runner, as GCP's MTU setting for VPCs is Workarounds (in projects using actions/runner, e.g. ARC)
Possible Solution (to support non
|
#if OS_WINDOWS | |
return await ExecuteDockerCommandAsync(context, "network", $"create --label {DockerInstanceLabel} {network} --driver nat", context.CancellationToken); | |
#else | |
return await ExecuteDockerCommandAsync(context, "network", $"create --label {DockerInstanceLabel} {network}", context.CancellationToken); | |
#endif |
It would need to pass this option when creating docker networks: --opt com.docker.network.driver.mtu=
.
Or/also to add a default by as noted above:
checking the MTU from the network bridge and using that when creating the network.
There's a PR here to do this! 👉 #1650 ❤️
We really don't want the runner to be a pass through for default configuration settings for docker. There are other network options which could be helpful, but we don't want to expose them as runner features in this way. Customizable default settings for the docker instance would be better set as a feature request to docker daemon itself. In the meantime, you have a few options:
|
Describe the enhancement
It would be great to set up custom options for networks created for
container
jobs.As of now, it is only possible to pass options to
docker create
command viajobs.<job_id>.container.options
Code Snippet
This could look this way:
Additional information
See, according to moby/moby#34981 , docker daemon options, such as mtu, are not passed to new bridge networks. So my CI jobs fail while trying to e. g. run
yum -y update
.NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md
The text was updated successfully, but these errors were encountered: