Repository navigation
Update NRI to latest (0.12.5) - #14453
MikeZappa87 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🔵 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
d111543 to
1770f27
Compare
5a64b10 to
a8508c8
Compare
a8508c8 to
6c0f2b9
Compare
|
If the StopPodSandbox NRI rpc returns error it doesn't block which is different behavior than the RunPodSandbox which stops the process. |
6c0f2b9 to
8c93d59
Compare
integration test results: --- PASS: TestNriPluginFailurePolicy (9.95s) |
|
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():
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. |
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>
4622c4a to
c5cd33c
Compare
|
I think this is not getting the latest fix |
I'll fix when I get back to my desk. I did @main |
c5cd33c to
aa78c0d
Compare
|
Fixed 👏 |
aa78c0d to
56f4028
Compare
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
56f4028 to
7552ffa
Compare
|
LGTM |

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