Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryGives each resource pool a stable CDI annotation key so kubelet can keep annotations from multiple pools.
No actionable issues were found. Tests were inspected but not run. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Allocate for each pool] --> B[Hash CDI prefix and pool name]
B --> C[Create pool-specific annotation key]
C --> D[Kubelet merges annotations]
D --> E[Runtime reads unchanged CDI device names]
Reviews (2) · Last reviewed commit: "fix(cdi): use a unique CDI annotation ke..." · Reviewed by Greptile |
When useCdi is enabled, the CDI annotation key was derived only from the CDI vendor and kind (cdi.k8s.io/nvidia.com_net-rdma), so every resource pool returned the same key from Allocate. Kubelet merges the annotations of all resources allocated to a container into a single map, so when a container requested several RDMA resources only one annotation survived and only one device was injected. Include the pool (resource) name in the annotation key, e.g. cdi.k8s.io/nvidia.com_net-rdma_<pool>. If the pool name would produce an invalid key (over 63 characters, or not ending with an alphanumeric character), fall back to a short SHA-256 hash of the pool name. Fixes: https://redmine.nvidia.com/issues/5369341 Signed-off-by: Fred Rolland <frolland@nvidia.com>
almaslennikov
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When useCdi is enabled, the CDI annotation key was derived only from the CDI vendor and kind (cdi.k8s.io/nvidia.com_net-rdma), so every resource pool returned the same key from Allocate. Kubelet merges the annotations of all resources allocated to a container into a single map, so when a container requested several RDMA resources only one annotation survived and only one device was injected.
Include the pool (resource) name in the annotation key, e.g. cdi.k8s.io/nvidia.com_net-rdma_. If the pool name would produce an invalid key (over 63 characters, or not ending with an alphanumeric character), fall back to a short SHA-256 hash of the pool name.
Fixes: https://redmine.nvidia.com/issues/5369341