Skip to content

Conversation

@klihub
Copy link
Member

@klihub klihub commented Feb 20, 2023

Update NRI dependency to pull in the latest NRI fixes. Update NRI configuration to match that of NRI itself. In particular,

  • remove NRI configuration file option (removed in NRI)
  • add option to disable connections from externally launched plugins
  • add options to override default plugin registration and request processing timeouts

Update NRI-related documentation to reflect these changes.

@klihub klihub force-pushed the devel/update-nri-config branch from 832e431 to f522269 Compare February 20, 2023 14:44
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.

see comments ..

we might need some extra description to cover how one would need to change the defaults to avoid conflicts with other installs of containerd/crio that are using the NRI plugin defaults..

SocketPath string `toml:"socket_path" json:"socketPath"`
// PluginPath is the path to search for NRI plugins to launch on startup.
PluginPath string `toml:"plugin_path" json:"pluginPath"`
// PluginConfigPath is the path to search for plugin-specific configuration.
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 copy the field descriptions for these NRI options to the containerd config toml description.. above in NRI.md

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the sample configuration fragment adding similar comments that explain the purpose of each field. Added a note about the common default NRI socket path preventing multiple NRI-enabled runtimes or runtime instances running on a single node with the same default socket config.

SocketPath: nri.DefaultSocketPath,
PluginPath: nri.DefaultPluginPath,
Disable: true,
SocketPath: nri.DefaultSocketPath,
Copy link
Member

Choose a reason for hiding this comment

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

is odd to be retrieving containerd config.toml defaults values from constants in a vendor'd package.. should these config defaults be specified here in the 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.

We considered the (well-known default) socket path to be part of the (runtime-agnostic) NRI API, so we defined it on the NRI side of the fence and made the configurable NRI socket path default to that in both NRI-enabled runtimes.

I think the alternative would have been (and still is) to instead co-locate the NRI socket with the runtime one in the runtime-specific directory and then take on the NRI side the cri-toolsish approach of probing sockets in known runtime-specific locations (unless specifically told otherwise) until one is found that accepts connections. However, if we jump to the NRI side of the fence, then this does not feel right. ATM NRI is runtime agnostic and is unaware of any runtime-specific details. It is the runtimes that already know about NRI.

No too strong feelings/opinion leaning in either direction. Just trying to provide some background how we ended up opting for the current choice...

@klihub klihub force-pushed the devel/update-nri-config branch from f522269 to 51a2ae2 Compare February 20, 2023 19:01
@mikebrow mikebrow added this to the 1.7 milestone Feb 22, 2023
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.

change looks good here.. would like to hold for containerd/nri#28 service fix.. and a release bump for containerd/nri for this breaking config change..

@kzys
Copy link
Member

kzys commented Feb 23, 2023

The PR has been merged. Waiting containerd/nri v0.3.x.

containerd/nri#28 (comment)

@fuweid
Copy link
Member

fuweid commented Feb 26, 2023

Update NRI plugin configuration to match that of NRI. Remove
option for the eliminated NRI configuration file. Add option
to disable connections from externally launched plugins. Add
options to override default plugin registration and request
timeouts.

Signed-off-by: Krisztian Litkey <[email protected]>
Update instructions for enabling NRI. Remove the now
unnecessary step of creating an NRI configuration file.
Add a note about the shared default NRI socket path
preventing two NRI-enabled runtimes to be run with the
default configuration on a single node.

Remove a leftover/half sentence that slipped through in
an earlier commit.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the devel/update-nri-config branch from 51a2ae2 to 2e9aaf0 Compare February 26, 2023 17:59
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants