-
Notifications
You must be signed in to change notification settings - Fork 145
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
[master] deb,rpm: add kmod as recommended dependency to provide modprobe #1118
Conversation
Depending on the host configuration, the `br_netfilter` module may not be loaded by default. In this situation, docker will try to load the module through `modprobe`. Older versions of docker would silently ignore failing to do so, log a message, and continue; time="2024-11-29T20:04:58.538404376Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: , error: exec: \"modprobe\": executable file not found in $PATH" However, starting with [db25b0dcd0461802289e962aa0df3abd323d1994][1] and [264c15bfc427d1321c5b302e48e16d113b06ef92][2], we now produce an error: === FAIL: libnetwork/drivers/bridge TestCreateFullOptions (0.04s) time="2024-11-29T19:03:44Z" level=error msg="Running modprobe br_netfilter failed with message: " error="exec: \"modprobe\": executable file not found in $PATH" bridge_linux_test.go:280: Failed to create bridge: loadBridgeNetFilterModule failed: cannot restrict inter-container communication: modprobe br_netfilter failed: exec: "modprobe": executable file not found in $PATH This patch updates the packages to add `kmod` (which provides `modprobe`) as a recommended dependency. We should probably look for alternatives in our code to not require `modprobe`. [1]: moby/moby@db25b0d [2]: moby/moby@264c15b Signed-off-by: Sebastiaan van Stijn <[email protected]>
Thanks for reviewing! Since opening this PR, I also discussed a bit with @robmry @neersighted to look for possible alternatives that don't require I was a bit hesitant on adding a new dependency, but pending an alternative in the daemon itself, I think it's the most correct thing to do for the time being (i.e., we need Once we have an alternative for calling Also opened a backport for 27.x; |
I just tried an equivalent to the It worked perfectly in a (privileged) docker-in-docker container on a Debian host that didn't have I'll make it try to fall-back to real |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @robmry ! Yeah, I think this patch is still OK to have. |
Depending on the host configuration, the
br_netfilter
module may not be loaded by default. In this situation, docker will try to load the module throughmodprobe
.Older versions of docker would silently ignore failing to do so, log a message, and continue;
However, starting with db25b0dcd0461802289e962aa0df3abd323d1994 and 264c15bfc427d1321c5b302e48e16d113b06ef92, we now produce an error:
This patch updates the packages to add
kmod
(which providesmodprobe
) as a recommended dependency. We should probably look for alternatives in our code to not requiremodprobe
.- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)