-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
simple run command with --sysctl for network interface fails after upgrade #47619
Comments
i pinned docker-ce to 25.0.5, my container works as before. so i guess it's caused by the recent 26 release. |
Hi @jwfang - thank you for narrowing down the issue and raising the clear report. It's fallout from #47062 - in 0046b16 we moved some of the network configuration from a pre-start hook in the runtime to after the container task has been created. As you suggest, that means the network interface renaming (moving one end of a veth device into the container namespace in cc @corhere - I think we'll need to go back to using the pre-start hook. |
Given how brittle it is to use |
@corhere have you been peeking into our internal slack? 😂 we were discussing exactly that, and for the same reason (my choice of words ("network connection") was a bit poor, but same intent); |
moby/moby#47619 Because of this bug eth0 is not created before sysctl are being set so it is not possible to set any syscts related to the specific interfaces. We can create a workaround by not setting eth0. Instead we can set default so eth0 will have this value assigned later when created.
moby/moby#47619 Because of this bug eth0 is not created before sysctl are being set so it is not possible to set any syscts related to the specific interfaces. We can create a workaround by not setting eth0. Instead we can set default so eth0 will have this value assigned later when created.
Description
after upgrade my Debian from bullseye to bookworm today, my container failed to work.
i traced it down to this simple command:
but when the container is started, the eth0 conf is right there. maybe network interface renaming timing changed ?
and if i change the interface name to lo or all, the above command works fine.
unfortunately, i have to rely on the interface name: if i use all to set both forwarding=1 and accept_ra=2, the container seems not respected accept_ra setting. in other words, if i use following commands, the containers won't get its IPv6 address form RA. (XXX is my custom IPv6 enabled MacVLAN network)
Reproduce
for --sysctl failure:
for no IPv6 address from RA (this probably not related to docker, just i can't use all for interface name)
Expected behavior
No response
docker version
Client: Docker Engine - Community Version: 26.0.0 API version: 1.45 Go version: go1.21.8 Git commit: 2ae903e Built: Wed Mar 20 15:18:02 2024 OS/Arch: linux/arm64 Context: default Server: Docker Engine - Community Engine: Version: 26.0.0 API version: 1.45 (minimum version 1.24) Go version: go1.21.8 Git commit: 8b79278 Built: Wed Mar 20 15:18:02 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: