Configurable network (copy options from default bridge network when creating a custom bridge network) #232
Labels
No Label
kind
bug
kind
build
kind/compatible
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
confirmed
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
reviewed
workaround
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#232
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
I have an network interface with a lower mtu as the default Docker mtu (
1500
).I configured the mtu in daemon.json. But when a runner is instantiated the mtu is
1500
again. This seems to be due to a new network being created for each RunContext. And I don't know why this does not abide the mtu configured in Docker's daemon.jsonSolution
Allow options to be passed down to the Docker client.
Since this is an upstream issue as well I opened the issue here. Because it seems like the API does not allow for options to be passed down.
Workaround
I added the options statically and compiled the act_runner myself
my testing:
mtu
indaemon.json
apply and restart docker
output:
As we can see,
mtu
is not exist inoptions
.So I guess this is docker's default behavior that the user-defined network won't follow the
mtu
configured in Docker'sdaemon.json
.But I think we can add a item of like
container.network_driver_opts
(refer to doc) in the config file of runner to make network options configurable.@sillyguodong
Yes, this is indeed the issue. That said. I have no idea on what to do next since the issue cascades into the forked
act
package.Does Gitea intend to make minimal changes to the package and prevent diversion to upstream? Or was the intention to create a point in time fork and make changes to fit Gitea's purpose?
We have no plan to hard fork act from upstream, and I am cautious about the solution "adding
container.network_driver_opts
", will this result in more and more docker-related configurations being added to configuration of act_runner?@wolfogre
Yes, but is this an issue?
I understand the argument of overwhelming configuration. But we know that Docker has a lot of sane defaults and most users would not have to touch the configuration in the first place.
Or is there an argument against specific configuration that will potentially break the CI?
These are just assumptions based on my experiences. Please elaborate
I've got another idea: copy the options from default bridge network when creating a custom bridge network, since users can modify
daemon.json
to update options of default bridge.And it makes sense to copy default options when create custom networks for jobs.
We cannot do that via
docker network create --config-from bridge xxx
, becausebridge
isn't a "configuration network". But we can still inspect the network via SDK client, then create a custom network with the same options.That is a good idea
But how do you propose this without modifying the forked act repo?
😄 You may have misunderstood, "we have no plan to hard fork act from upstream", I meant it's a soft fork. We will follow upstream regularly, not keeping same with upstream.
Of cause we modify the forked act repo, see https://gitea.com/gitea/act/pulls?state=closed
Ahhh
Well that makes sense. Haha... My bad 😬
Then this approach seems to make the most sense. Good thinking 👍
Configurable networkto Configurable network (copy options from default bridge network when creating a custom bridge network)Is this still being worked on? Without this feature it seems impossible to use act_runner in my setup.
I'd love to help but I have no experience with go.
@northcode
As a temporary workaround, you can do this
Vendor the dependencies
Edit this file and add the mtu option like below
After this you can compile the binary yourself
@crow thank you very much! that works! I hit a new roadblock getting docker build to work in k8s, but I'm currently digging through some other issues to figure out a solution to that.