Skip to content
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

[27.x backport] deb,rpm: add kmod as recommended dependency to provide modprobe #1121

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

thaJeztah
Copy link
Member


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 and 264c15bfc427d1321c5b302e48e16d113b06ef92, 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.

- 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)

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 <github@gone.nl>
(cherry picked from commit deed8d9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit fc3f9d6 into docker:27.x Dec 4, 2024
8 checks passed
@thaJeztah thaJeztah deleted the 27.x_backport_add_kmod branch December 4, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants