Skip to content

Conversation

@tariq1890
Copy link
Contributor

No description provided.

@tariq1890 tariq1890 force-pushed the nri-plugin-server branch 12 times, most recently from 933aa39 to 446d2f0 Compare November 22, 2025 19:07
@tariq1890 tariq1890 force-pushed the nri-plugin-server branch 11 times, most recently from 94a00c8 to cbd8cf9 Compare December 4, 2025 07:20
@tariq1890 tariq1890 marked this pull request as ready for review December 4, 2025 07:44

for _, name := range devices {
a.AddCDIDevice(
&api.CDIDevice{
Copy link
Member

@elezar elezar Dec 5, 2025

Choose a reason for hiding this comment

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

As far as I am aware, this introduces restrictions on compatible containerd / cri-o versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that we've moved to native CDI, the minimum supported containerd is now v1.7. Will that be affected by this change?

Copy link
Member

Choose a reason for hiding this comment

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

We would need to check when CDI Devices were added to the NRI APIs. The versions of containerd / cri-o that then started responding to these fields would be the minimum versions.

Copy link
Member

Choose a reason for hiding this comment

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

Here was the NRI commit: containerd/nri@c9b4798
Tagged as v0.7.0.

We would also need to check which version of containerd includes the related adjustments. (see https://github.com/containerd/containerd/blob/6dc89d8b392dbea8651ab0b141765f196836205c/internal/cri/nri/nri_api_linux.go#L321-L326).

(I wasn't able to find similar code in v1.7 ir v2.0).

Copy link

@klihub klihub Dec 9, 2025

Choose a reason for hiding this comment

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

@elezar CDI injection from an NRI plugin does not work in 1.7.x. I have a fix for it which I never filed a PR from. But if it's important enough for you guys, I can file it and then see if we could get it merged.

Copy link

Choose a reason for hiding this comment

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

@elezar Here is the filed PR against the 1.7 maintenance branch: containerd/containerd#12650

Copy link

Choose a reason for hiding this comment

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

@elezar And here is one filed against the 2.0 maintenance branch: containerd/containerd#12651

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @klihub !

Copy link

Choose a reason for hiding this comment

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

@elezar @tariq1890 Not sure how realistic is to get containerd/containerd#12651 in. 2.0 is EOL'd. 12651 would require a new tagged release, and if that is an absolute no-go (it's usually not that inflexible), then it's a tough call. Anyway, you might want to chime in there and comment.

Copy link

Choose a reason for hiding this comment

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

@elezar @tariq1890 Not sure how realistic is to get containerd/containerd#12651 in. 2.0 is EOL'd. 12651 would require a new tagged release, and if that is an absolute no-go (it's usually not that inflexible), then it's a tough call. Anyway, you might want to chime in there and comment.

The v1.7 version of the fix has been now commented as being considered for (a late) inclusion in the upcoming v1.30 release. You might want to chime in there as well.

@tariq1890 tariq1890 force-pushed the nri-plugin-server branch 3 times, most recently from d593d8b to 13b67bf Compare December 8, 2025 07:20
}

func getAnnotation(annotations map[string]string, key, ctr string) string {
nriPluginAnnotationKey := fmt.Sprintf("%s/container.%s", key, ctr)
Copy link
Member

Choose a reason for hiding this comment

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

I know that the original example allowed all containers in a pod to automatically have access to devices using a different key. Here, I understand that we're only allowing a SINGLE form, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, correct we are only allowing a single form. Please let me know if you have any concerns

@tariq1890 tariq1890 force-pushed the nri-plugin-server branch 3 times, most recently from 4e6d0c5 to a1227ab Compare December 11, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants