-
Notifications
You must be signed in to change notification settings - Fork 521
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
Mount static kmod as /sbin/modprobe #4007
Conversation
Code changes LGTM, though I would split them into one for host-ctr and one for containerd. Does it work for Cilium? For the example pod spec, can you load a module via |
The code looks good, it would be awesome to include a before and after on that pod test to show the change, even better showing it loading a module after the fix to prove this fixes the issue. |
Yeah. It loads the modules like expected.
I had validated but didn't add it to the initial notes |
Validated via SHA512 that it's the same modprobe
|
For the validation, you could just have checked that the |
@@ -102,6 +102,15 @@ oci-defaults = { version = "v1", helpers = ["oci_defaults"] } | |||
"mode=755", | |||
"size=65536k" | |||
] | |||
}, | |||
{ | |||
"destination": "/sbin/modprobe", |
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.
One risk of this implementation is that if PATH
is /usr/bin:/sbin
, the modprobe
binary in the container will be used instead of the injected modprobe
. I guess that's a calculated risk to take, since we can't inject modprobe
in every single path in PATH
. Probably something to follow up for a later release is checking PATH
and inject modprobe
to the first path in that list.
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.
It would be good to validate that Cilium specifically works as expected with this change, in case there are more paths we need to bind to.
bd4debd
to
54d8e27
Compare
New changes include:
|
Co-authored-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
Fixing typo in the commit message |
Validated by running the Locally launched container:
VS container launched on bottlerocket
I'm able to load and unload modules
|
Issue number:
Closes #3968
Description of changes:
This change mounts the static kmod built in #3981 into a customer container.
Testing done:
Tested on the host-ctr:
Tested on a kubernetes container:
Pod Spec used:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.