Skip to content

NRI: config reload#51711

Merged
robmry merged 1 commit intomoby:masterfrom
robmry:nri-config-reload
Dec 15, 2025
Merged

NRI: config reload#51711
robmry merged 1 commit intomoby:masterfrom
robmry:nri-config-reload

Conversation

@robmry
Copy link
Contributor

@robmry robmry commented Dec 12, 2025

- What I did

Make NRI config reloadable.

- How I did it

With NRI enabled, a reload will always restart the NRI adaptation layer. That means daemon-started plugins will restart/resync, and so their config will be re-read. If any plugins started independently and connected via the daemon's socket, they'll be dropped and must reconnect/resync. Maybe that'll end up being too disruptive/slow, it depends on how long real plugins take to register and sync.

- How to verify it

New integration test.

- Human readable description for the release notes

Add experimental NRI support

- A picture of a cute animal (not mandatory but encouraged)

@robmry robmry added this to the 29.2.0 milestone Dec 12, 2025
@robmry robmry added kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny area/daemon Core Engine labels Dec 12, 2025
@robmry robmry marked this pull request as draft December 12, 2025 17:42
@robmry robmry force-pushed the nri-config-reload branch 2 times, most recently from d0cd56f to e1bbf65 Compare December 12, 2025 18:38
@robmry robmry requested a review from Copilot December 12, 2025 22:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements configuration reload support for NRI (Node Resource Interface), allowing the NRI subsystem to be dynamically enabled/disabled and reconfigured without restarting the daemon.

Key changes:

  • NRI configuration can now be reloaded via daemon config reload
  • NRI adaptation layer restarts on reload, causing plugins to resync
  • New integration test validates reload behavior with plugin configuration changes

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
daemon/reload.go Adds NRI reload handler to daemon's configuration reload chain
daemon/internal/nri/nri.go Implements PrepareReload method to validate and stage NRI configuration changes
integration/daemon/nri/nri_test.go Adds comprehensive integration test for NRI reload functionality
integration/daemon/nri/testdata/test_plugin.go Adds test plugin that reads configuration and injects environment variables

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robmry robmry marked this pull request as ready for review December 15, 2025 09:38
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

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

Nice, LGTM. Just a minor nit. Nothing worth blocking on though.

Signed-off-by: Rob Murray <rob.murray@docker.com>
@robmry robmry merged commit 239a49d into moby:master Dec 15, 2025
321 of 329 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/daemon Core Engine impact/changelog kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants