Skip to content

fix(plugin): remove the node capacity entries when reporting is off - #164

Merged
moezdil merged 1 commit into
mainfrom
fix/clear-stale-node-capacity
Oct 11, 2026
Merged

moezdil merged 1 commit into
mainfrom
fix/clear-stale-node-capacity

Conversation

@moezdil

@moezdil moezdil commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

/kind bug

With -report_node_capacity the plugin patches amd.com/gpumem and amd.com/gpucores into the node status. Kubelet keeps an extended resource it did not advertise itself, so after turning the option off the old values stayed and kubelet kept rejecting Pods that ask for more than the stale amount. The plugin now removes the two entries when they are still listed and reporting is off; the chart grants nodes/status patch unconditionally, because the permission was only rendered with the option on and the clear failed with forbidden otherwise.

Refs #157

Verified on an MI325X node: with reporting on the node lists gpumem 261824 and gpucores 304; after switching it off both are gone from capacity and allocatable and a Pod asking for 200000 MiB schedules. The new unit test fails without the change.

AI assistance was used for this PR.

With -report_node_capacity the plugin patches amd.com/gpumem and
amd.com/gpucores into the node status. Kubelet keeps an extended resource it
did not advertise itself, so after turning the option off the old values
stayed and kubelet rejected Pods asking for more than the stale amount.

Clear the two resources when they are still listed and reporting is off, and
grant the nodes/status patch permission unconditionally so the plugin may do
so.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@hami-robot hami-robot Bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 11, 2026
@hami-robot

hami-robot Bot commented Oct 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: moezdil

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7a1a7bd-b7c2-4592-a040-0332447a23cc

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@moezdil
moezdil merged commit 8f2e12a into main Oct 11, 2026
11 of 12 checks passed
@moezdil
moezdil deleted the fix/clear-stale-node-capacity branch October 11, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant