Skip to content

Commit deed8d9

Browse files
committed
deb,rpm: add kmod as recommended dependency to provide modprobe
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]>
1 parent 50cb52e commit deed8d9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

deb/common/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Recommends: apparmor,
3434
ca-certificates,
3535
docker-ce-rootless-extras,
3636
git,
37+
kmod,
3738
libltdl7,
3839
pigz,
3940
procps,

rpm/SPECS/docker-ce.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Vendor: Docker
1313
Packager: Docker <[email protected]>
1414

1515
Requires: /usr/sbin/groupadd
16+
# Provides modprobe, which we use to load br_netfilter if not loaded.
17+
Recommends: kmod
1618
Requires: docker-ce-cli
1719
Recommends: docker-ce-rootless-extras
1820
Requires: container-selinux >= 2:2.74

0 commit comments

Comments
 (0)