Skip to content

Update NRI to latest (0.12.5) - #14453

Open
MikeZappa87 wants to merge 1 commit into
containerd:mainfrom
MikeZappa87:mzappa/nriversionbump
Open

MikeZappa87 wants to merge 1 commit into
containerd:mainfrom
MikeZappa87:mzappa/nriversionbump

Conversation

@MikeZappa87

@MikeZappa87 MikeZappa87 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Waiting on NRI tag release. I will see the work involved to add a e2e/integration test around this new behavior as well.

cc: @aojea @mikebrow

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The lifecycle failure-handling changes need maintainer validation, and the dependency update still awaits its upstream release tag.

No open issues 🎉

What changed in this PR

Updates containerd’s NRI dependency to a newer upstream snapshot while awaiting a release tag, bringing configurable plugin failure handling.

Changes:

  • Adds failure policies controlling request failure and plugin retention after timeouts.
  • Updates the API, generated serialization, plugin stub, and lifecycle handling.
  • Replaces the semantic-version dependency with local parsing and comparison logic.
File Description
vendor/​modules.txt Records the updated NRI version.
vendor/​github.com/​containerd/​nri/​README.md Documents failure policies and timeout behavior.
vendor/​github.com/​containerd/​nri/​pkg/​version/​version.go Implements local semantic-version handling.
vendor/​github.com/​containerd/​nri/​pkg/​stub/​stub.go Allows plugins to declare failure policies.
vendor/​github.com/​containerd/​nri/​pkg/​api/​api.proto Defines failure-policy protocol fields.
vendor/​github.com/​containerd/​nri/​pkg/​api/​api_vtproto.pb.go Adds failure-policy serialization support.
vendor/​github.com/​containerd/​nri/​pkg/​adaptation/​plugin.go Applies policies to lifecycle request failures.
vendor/​github.com/​containerd/​nri/​pkg/​adaptation/​api.go Exposes the failure-policy type alias.
go.sum Adds checksums for the NRI snapshot.
go.mod Updates the NRI dependency requirement.

Review effort: Balanced

@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch from d111543 to 1770f27 Compare October 22, 2026 17:51
Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The upstream release tag remains pending, and lifecycle failure-handling changes need confirmed integration results and human review.

No open issues 🎉

Review effort: Balanced

@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch 2 times, most recently from 5a64b10 to a8508c8 Compare October 22, 2026 19:55
Copilot AI balanced review requested due to automatic review settings October 22, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The lifecycle failure-handling changes need runtime validation and maintainer review, and the upstream release tag remains pending.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 00:10
@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch from a8508c8 to 6c0f2b9 Compare October 23, 2026 00:10
@MikeZappa87
MikeZappa87 marked this pull request as ready for review October 23, 2026 00:10
@MikeZappa87 MikeZappa87 changed the title [WIP] Update NRI to latest (Waiting on NRI tag) Update NRI to latest (0.12.4) Oct 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Lifecycle failure and connection-retention changes need human review supported by live integration results that were not verified here.

1 open issue

Review effort: Balanced

Comment thread integration/nri_test.go
@MikeZappa87

Copy link
Copy Markdown
Member Author

@aojea

err := c.nri.StopPodSandbox(ctx, &sandbox)

If the StopPodSandbox NRI rpc returns error it doesn't block which is different behavior than the RunPodSandbox which stops the process.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 01:10
@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch from 6c0f2b9 to 8c93d59 Compare October 23, 2026 01:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Lifecycle timeout and disconnection changes need human confirmation with the privileged integration suite, whose results remain unverified.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@MikeZappa87

Copy link
Copy Markdown
Member Author

🔵 Needs a closer look

Lifecycle timeout and disconnection changes need human confirmation with the privileged integration suite, whose results remain unverified.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

integration test results:

--- PASS: TestNriPluginFailurePolicy (9.95s)
--- PASS: TestNriPluginFailurePolicy/default_policy_drops_plugin_and_proceeds (2.50s)
--- PASS: TestNriPluginFailurePolicy/fail_request_and_drop_plugin (2.32s)
--- PASS: TestNriPluginFailurePolicy/keep_plugin_and_proceed (2.63s)
--- PASS: TestNriPluginFailurePolicy/fail_request_and_keep_plugin_connected (2.50s)
PASS

@aojea

aojea commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

failures are legit, sending patch to NRI, there was a latent bug that before worked by accident caused by the lazy cleanup done via defer r.removeClosedPlugins():

  • When a plugin disconnected while idle (p.closed = true), the next CRI request still called p.impl.() on the closed p.rpcc and got ttrpc.ErrClosed.
  • Because handleRequestError always returned nil on ttrpc.ErrClosed, the error was ignored and defer r.removeClosedPlugins() cleaned up the plugin after the RPC finished.

With FailRequest: true, calling p.impl.() on a plugin that NRI already knows is closed (p.isClosed() == true via WithOnClose) turns a prior idle disconnect into a ttrpc: closed error on the next CRI request.

mikebrow pushed a commit to containerd/nri that referenced this pull request Oct 23, 2026
When a plugin disconnects while no request is in progress, the adaptation
marks it closed but keeps it in the plugin list. The list is only cleaned
up at the end of the next request. That next request is still relayed to
the closed plugin and fails with "ttrpc: closed".

Before failure policies, that error was always swallowed and the request
proceeded. With fail_request, it fails the request for a plugin that is
already gone. The same happens for validators, independent of any policy:
the next CreateContainer fails with "validator plugin ... failed: ttrpc:
closed". In both cases the failure happens exactly once, because the same
request then removes the plugin.

Skip closed plugins when relaying a request, in the lifecycle loops and in
the validators loop. The check is in the adaptation and not in the plugin
relay methods on purpose: in CreateContainer, the plugin list reported to
the validators is built before the relay. A closed plugin must not be
reported as present, so that the required plugins check of the default
validator rejects the container instead of passing it.

This was found by the containerd integration tests when updating NRI to
v0.12.4 (containerd/containerd#14453). A test stops a fail_request plugin,
and the first RunPodSandbox of the next test failed with
"plugin 00-timeout-plugin failed to handle RunPodSandbox request: ttrpc:
closed":
https://github.com/containerd/containerd/actions/runs/39886249632/job/120339658097

Tests cover each of the 13 lifecycle requests as the first request after
an idle disconnect, a validator that disconnects while idle, a plugin that
disconnects during a request before its turn, and the required plugins
check catching a plugin that disconnected while idle.

Signed-off-by: Antonio Ojea <aojea@google.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:30
@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch from 4622c4a to c5cd33c Compare October 23, 2026 14:33
@MikeZappa87

Copy link
Copy Markdown
Member Author

@aojea @mikebrow this branch has nri pointed at main to verify behavior before tagging NRI again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The temporary fork dependency and lifecycle failure-handling changes need maintainer validation against the final upstream release.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The lifecycle changes need maintainer review and integration validation, particularly the unresolved idle-disconnect request failure.

No open issues 🎉

Review effort: Balanced

@mikebrow mikebrow changed the title Update NRI to latest (0.12.4) Update NRI to latest (0.12.5) Oct 23, 2026
@aojea

aojea commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

I think this is not getting the latest fix go get github.com/containerd/nri@5df40b41f7a269412ea74505265b9142c4d4ecb5 go mod tidy && go mod vendor

@MikeZappa87

Copy link
Copy Markdown
Member Author

I think this is not getting the latest fix `go get github.com/containerd/nri@5df40b41f7a269412ea74505265b9142c4d4ecb5

go mod tidy && go mod vendor`

I'll fix when I get back to my desk. I did @main

Copilot AI balanced review requested due to automatic review settings October 23, 2026 15:52
@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch from c5cd33c to aa78c0d Compare October 23, 2026 15:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The prerelease update changes lifecycle failure propagation and connection handling, warranting maintainer confirmation of integration coverage and release readiness.

No open issues 🎉

Review effort: Balanced

@aojea

aojea commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Fixed 👏

@mikebrow

Copy link
Copy Markdown
Member

Copilot AI balanced review requested due to automatic review settings October 23, 2026 18:44
@MikeZappa87
MikeZappa87 force-pushed the mzappa/nriversionbump branch from aa78c0d to 56f4028 Compare October 23, 2026 18:44
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Retaining an unresponsive plugin connection can leave transport writes blocked indefinitely while holding the shared NRI lifecycle lock.

No open issues 🎉

Review effort: Balanced

@mikebrow mikebrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@aojea

aojea commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

4 participants