Skip to content

Conversation

@klihub
Copy link
Member

@klihub klihub commented Jan 12, 2026

Add support for adjusting sysctl settings.

@klihub klihub requested review from mikebrow and samuelkarp January 12, 2026 17:26
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

just a minor change requested

as the network interface `netdev0`, and the host network interface `ens2.101` into
container `c1` as the network interface `netdev1`.

### Sysctl Annotations
Copy link
Member

Choose a reason for hiding this comment

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

need to add sysctl to the top of the readme..

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

as the network interface `netdev0`, and the host network interface `ens2.101` into
container `c1` as the network interface `netdev1`.

### Sysctl Annotations
Copy link
Member

Choose a reason for hiding this comment

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

It seems a little odd to me to put sysctls in the device injector. This plugin has turned into a bit of a grab-bag. Should we rename this so it's more generic of a plugin?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we should. I was thinking the same, basically to 1) rename the plugin as container-adjuster, 2) add command line options (and probably env. vars) to allow selectively disabling unwanted types of adjustments.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you prefer doing it as part of this PR, or as a separate one ?

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with it being separate, but we should do it soon.

  1. add command line options (and probably env. vars) to allow selectively disabling unwanted types of adjustments

Is our goal here mostly to demo different NRI adjustments or to provide a plugin we expect users to actually run? For a demo I don't think the command-line options are really necessary, but for a production-ready plugin we probably need more than just those changes.

Copy link
Member

Choose a reason for hiding this comment

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

is also a nice test tool..

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, but test/demo are the same category to me.

Copy link
Member

Choose a reason for hiding this comment

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

as with ctr.. test/demo/debug tools tend to get used beyond our recommendations

Copy link
Member

Choose a reason for hiding this comment

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

Understood. My question is still about intent though. If it is our intent for this to be a more broadly-useful plugin, we have additional work to do. If not, then I think the command-line options are unnecessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mikebrow @samuelkarp We can limit our changes for now to those that we think are necessary regardless of whether we intend it as a test/demo tool or as a more generally useful plugin for folks to consume and use. I think those would include at least this PR, a few fixes to the docs for undocumented existing features I spotted, and the renaming of the plugins to something more closely reflecting reality (maybe container-adjuster).

Then we can decide later if we intend this as a more generally useful plugin that folks could consume, and do the remaining necessary work if decide to do so.

Copy link
Member

Choose a reason for hiding this comment

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

fair

@klihub klihub force-pushed the devel/device-injector/sysctl-adjustment branch 4 times, most recently from bbe1f1b to 6f3bf01 Compare January 14, 2026 09:58
Comment on lines +158 to +159
all. Trying to adjust such a setting will result in an error and a failure to
create the container.
Copy link
Member

Choose a reason for hiding this comment

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

An error from the container runtime? I don't know if we have validation for namespaced sysctls within containerd...

Copy link
Member Author

@klihub klihub Jan 15, 2026

Choose a reason for hiding this comment

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

It's probably in runc/crun. With runc I got an error message specifically stating that I was trying to set a non-namespaced sysctl setting, and it did fail container creation.

Copy link
Member

Choose a reason for hiding this comment

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

runc guys.. it's probably in lib container ... lib container guys.. it's the kernel

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@klihub klihub force-pushed the devel/device-injector/sysctl-adjustment branch from 6f3bf01 to 624ea10 Compare January 15, 2026 09:39
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

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