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

Enable NRI by default #9744

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Conversation

klihub
Copy link
Member

@klihub klihub commented Feb 3, 2024

As discussed this in the last community meetings, we'd like to flip NRI on by default in 2.0. The consensus was that this should be safe to do and there was no opposing opinions voiced. Hence this PR flips the default from disabled to enabled and updates the documentation accordingly.

docs/NRI.md Outdated Show resolved Hide resolved
@@ -42,7 +42,7 @@ type Config struct {
// DefaultConfig returns the default configuration.
func DefaultConfig() *Config {
return &Config{
Disable: true,
Copy link
Member

@fuweid fuweid Feb 4, 2024

Choose a reason for hiding this comment

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

I think we can suggest user to use disabled_plugins to disable NRI and remove this field. Anyway, our code should handle if NRI plugin is empty.

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't though of that... But what about configuration migration ? I think with the current plumbing it would not be possible to automatically migrate a 1.7 configuration (which has NRI disabled in the plugin's own configuration) to a 2.0 configuration which then would have NRI disabled by the disabling the plugin itself in the configuration's global section, because IIUC the plugin cannot alter/does not have access to it.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah. It's hard to handle migration. However, we should remove the disable in the future since it's not good patten in plugin design. (I'm still thinking that 2.0 is good slot to remove it)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. It's hard to handle migration. However, we should remove the disable in the future since it's not good patten in plugin design. (I'm still thinking that 2.0 is good slot to remove it)

Is it completely out of the question to update the current configuration migration infra so that, in addition to changing its own configuration, a plugin could ask to be added to the list of disabled plugins (for instance via an extra boolean returned from ConfigMigration() ) ?

Copy link
Member

Choose a reason for hiding this comment

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

We can document it, but agreed that we should keep the config for now. There are many cases where a plugin will skip itself based on the configuration.

Copy link
Member

Choose a reason for hiding this comment

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

agree to keep it for now new 2.0 users can enable the disable for an extra security check and we can make explicit mention in the release notes.. possibly noting to admins what they should to do to verify NRI plugins

@klihub klihub force-pushed the devel/enable-nri-by-default branch from 1d0e24b to 4f41ce4 Compare February 4, 2024 09:40
@klihub klihub force-pushed the devel/enable-nri-by-default branch from 4f41ce4 to fe24b91 Compare February 4, 2024 09:42
@AkihiroSuda AkihiroSuda added this to the 2.0 milestone Feb 4, 2024
@klihub klihub requested a review from dcantah February 4, 2024 13:54
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid added this pull request to the merge queue Feb 7, 2024
Merged via the queue into containerd:main with commit de14037 Feb 7, 2024
46 checks passed
@klihub klihub deleted the devel/enable-nri-by-default branch February 7, 2024 12:04
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.

thanks @klihub

@dmcgowan dmcgowan changed the title Flip NRI on by default. Enable NRI by default Mar 18, 2024
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.

None yet

8 participants