Skip to content

Add DRA NUMA list attribute - #283

Open
killianmuldoon wants to merge 7 commits into
kubernetes-sigs:mainfrom
killianmuldoon:pr-dra-list
Open

Add DRA NUMA list attribute#283
killianmuldoon wants to merge 7 commits into
kubernetes-sigs:mainfrom
killianmuldoon:pr-dra-list

Conversation

@killianmuldoon

Copy link
Copy Markdown

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR uses the upstream DRA NUMA helpers to enable reporting of the upstream standard NUMA List attribute in DRANet where available. The list attribute is described in a KEP. It enables matching by closest NUMA on more complex hardware where the network device NUMA node may not directly match the node of other hardware.

A bump to Kubernetes 1.37-rc.0 libraries is included as a dependency. This feature is enabled with a feature gate on Kubernetes 1.37, and the upstream helper libraries are only available in 1.37 tags.

Which issue(s) this PR is related to:

N/A

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Added - standardized NUMA list attribute behind feature gate.

@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 10, 2026
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for dranet canceled.

Name Link
🔨 Latest commit 4224279
🔍 Latest deploy log https://app.netlify.com/projects/dranet/deploys/6a85700e2b250c0008f0d270

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 10, 2026
Comment thread cmd/webhook-whereabouts/go.sum
Comment thread pkg/driver/dra_hooks.go
// WatchHealthStatus implements the Kubernetes 1.37 DRAPlugin contract. DRANET
// disables the optional health service.
func (np *NetworkDriver) WatchHealthStatus(context.Context, chan<- kubeletplugin.DeviceHealthReport) error {
return kubeletplugin.ErrHealthNotSupported

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is required in 1.37 - but not implemented as part of this change. I imagine it needs a good amount more conversation.

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.

Is have a stub implementation required or optional?

@killianmuldoon killianmuldoon Aug 14, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's a required part of the interface in 1.37 - it was added to the DRAPlugin interface as part of this change.

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.

Gotcha, thanks!

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.

@killianmuldoon please add a TODO, we already report health so implementing this sounds reasonable if helps reliability ... although I want to understand better this feature , how it works and what problems solve

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.

WatchHealthStatus is about device health that can be propagated all the way to the workload pod's status containerStatus.AllocatedResourcesStatus if the device claimed by the the pod becomes unhealthy. It is sort of alternative (if we can say so) to the events which is general but this is specifically for the DRA drivers.

xref: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/4680-add-resource-health-to-pod-status/README.md

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.

we definitively should have this , but also put some user stories on how we want to implement it , opened #293 for tracking, just add TODO and reference that issue please

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I added a TODO with a link to the issue - let me know if you'd prefer a different format or wording.

@gauravkghildiyal gauravkghildiyal 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.

Comment thread pkg/driver/dra_hooks.go
// WatchHealthStatus implements the Kubernetes 1.37 DRAPlugin contract. DRANET
// disables the optional health service.
func (np *NetworkDriver) WatchHealthStatus(context.Context, chan<- kubeletplugin.DeviceHealthReport) error {
return kubeletplugin.ErrHealthNotSupported

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.

Is have a stub implementation required or optional?

Comment thread pkg/features/features.go
Comment thread cmd/webhook-whereabouts/go.sum

@gauravkghildiyal gauravkghildiyal 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.

Thanks @killianmuldoon. Took a closer look, mostly looking good.

One request I had was if we could be a slightly more detailed with the release notes. For example, let's include the full attribute name of the attribute being added. Also, there is this bit of nuance with the standard NUMA attribute that I remember discussing which we should be linking to https://www.kubernetes.dev/resources/keps/6072/#consumer-expectations.

Comment thread cmd/webhook-whereabouts/go.sum
Comment thread pkg/driver/dra_hooks.go
// WatchHealthStatus implements the Kubernetes 1.37 DRAPlugin contract. DRANET
// disables the optional health service.
func (np *NetworkDriver) WatchHealthStatus(context.Context, chan<- kubeletplugin.DeviceHealthReport) error {
return kubeletplugin.ErrHealthNotSupported

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.

Gotcha, thanks!

Comment thread pkg/features/features.go
Comment thread pkg/inventory/db.go
Comment thread pkg/inventory/db.go
db.deviceAttributeMachineModifiers...,
)
if err != nil {
klog.V(4).Infof("Not publishing standardized NUMA attribute for PCI device %s: %v", normalizedAddr, err)

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.

Should we log this as Error instead?

(Matches the other standard attribute GetPCIeRootAttributeByPCIBusID handling)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm not so sure here - the error could be very noisy if there's devices without NUMA information. That could potentially happen on some VM setups. That said I'm happy either way here.

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.

You're right. Thinking about this more, GetPCIeRootAttributeByPCIBusID has a less chance of failing compared to NUMA (just because a PCI Device is more than likely to have a PCIe root, but not necessary have NUMA information populated). Sorry for asking you to change it back to the original.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No issue changing it back - set it to Info now!

Comment thread pkg/inventory/db_test.go
_ = db.addPCIAttributes(devices, nil)
})

t.Run("publishes standardized scalar NUMA attribute by default", func(t *testing.T) {

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.

The tests are helpful. Thanks for adding them!

@killianmuldoon killianmuldoon changed the title Add DRA NUMA list attribute when available Add DRA NUMA list attribute Aug 17, 2026
@aojea

aojea commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This feature is enabled with a feature gate on Kubernetes 1.37, and the upstream helper libraries are only available in 1.37 tags.

@gauravkghildiyal any special reason to feature gate this option? is a read only attribute from a kubernetes well defined value so it feels we should expose it once we move to 1.37

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 18, 2026
@kubernetes-prow kubernetes-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 18, 2026
@gauravkghildiyal

Copy link
Copy Markdown
Member

This feature is enabled with a feature gate on Kubernetes 1.37, and the upstream helper libraries are only available in 1.37 tags.

@gauravkghildiyal any special reason to feature gate this option? is a read only attribute from a kubernetes well defined value so it feels we should expose it once we move to 1.37

This is slightly confusing and non-ideal from upstream itself, but the idea is that the attribute resource.kubernetes.io/numaNode can both be a scalar value (e.g. 0) or a list value (e.g. [0, 1, 2, 3]).

Defining a "list" type attribute is still alpha in DRA. So what this change is feature gating is NOT whether to publish the attribute, but whether to publish it as a scalar or a list. If you think when we change this from scalar to list then it would be a breaking change, you are right, but that's the recommendation https://www.kubernetes.dev/resources/keps/6072/#consumer-expectations without an alternative option.

@gauravkghildiyal

Copy link
Copy Markdown
Member

@killianmuldoon One last thing and we should be good: #283 (comment)

Signed-off-by: Killian Muldoon <kmuldoon@nvidia.com>
@gauravkghildiyal

Copy link
Copy Markdown
Member

/label tide/merge-method-squash
/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 20, 2026
@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 20, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauravkghildiyal, killianmuldoon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants