Skip to content
New issue

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

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

Already on GitHub? # to your account

how to set mtu for woodpecker-agent #1579

Closed
4 tasks done
huaxk opened this issue Feb 5, 2023 · 8 comments
Closed
4 tasks done

how to set mtu for woodpecker-agent #1579

huaxk opened this issue Feb 5, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@huaxk
Copy link

huaxk commented Feb 5, 2023

Component

agent

Describe the bug

I installed woodpecker on k8s via helm, but cannot download large files in the image started by the agent with dind, the problem should be in the mtu value, it may be set to less than the default value 1500, such as 1300, but I can't find a way to set the mtu for the agent. This problem can be solved by setting env: DRONE_RUNNER_NETWORK_OPTS: "com.docker.network.driver.mtu:1300" in drone.

System Info

woodpecker version: 0.15.6
k8s version: v1.24.7+rke2r1

Additional context

No response

Validations

@6543
Copy link
Member

6543 commented Feb 15, 2023

what image/plugin do you use to download stuff?

@anbraten anbraten added bug Something isn't working and removed pending:bug labels Feb 28, 2023
@huaxk
Copy link
Author

huaxk commented Mar 7, 2023

I install woodpecker by helm:

woodpecker/woodpecker-server    0.15.6          v0.15.6
woodpecker/woodpecker-agent     0.15.6          v0.15.6
docker:20.10.12-dind

@jaqua
Copy link

jaqua commented Apr 2, 2023

@huaxk Did you find a solution?

In drone you can set MTU:
gliderlabs/docker-alpine#307 (comment)

But using woodpecker, every docker build command gets stucked.

@6543
Copy link
Member

6543 commented Apr 2, 2023

@huaxk well we can do so too: https://woodpecker-ci.org/plugins/Docker%20Buildx -> Advanced Settings

so this was a plugin question issue ... can I close this?

@jaqua
Copy link

jaqua commented Apr 2, 2023

@6543 I need to use docker command inside of my own image. So Docker Buildx is not an option for me. I'm running a monorepo and in my CI I will build all affected apps. But running my script - which is working locally - will fail in the pipeline as I cannot set the mtu.

Something about this:

https://github.com/drone/charts/pull/109/files

To ensure that the temporary Docker networks created by the runner also have the appropriate value, add DRONE_RUNNER_NETWORK_OPTS to the env section of your values.yaml file:

env:
  DRONE_RUNNER_NETWORK_OPTS: "com.docker.network.driver.mtu:12345"

I think I need an option to set the MTU for the woodpecker agent dind

@NPCDW
Copy link

NPCDW commented Jun 2, 2023

If you can upgrade docker, then docker 24.0.0 solves this problem, you can configure /etc/docker/daemon.json, e.g.

{
  "mtu": 1450,
  "default-network-opts": {"bridge": {"com.docker.network.driver.mtu": "1450"}}
}

references:

@zc-devs
Copy link
Contributor

zc-devs commented Aug 5, 2024

Seems, this is not backend/kubernetes issue. Or is this a question? 🤔

@qwerty287
Copy link
Contributor

Seems like a question that looks resolved to me. I'll close, please comment if it's not clear

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants