Skip to content

fix(plugin): serve whole GPUs when no HAMi-tracked pod is pending - #161

Merged
moezdil merged 1 commit into
mainfrom
fix/allocate-without-hami-pod
Oct 11, 2026
Merged

moezdil merged 1 commit into
mainfrom
fix/allocate-without-hami-pod

Conversation

@moezdil

@moezdil moezdil commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

/kind bug

Allocate returned "no binding pod found" for a Pod that carries none of HAMi's bind-time annotations (placed by another scheduler or next to a second device plugin), so the whole-GPU fallback from #18 was never reached and the Pod failed with UnexpectedAdmissionError. This treats that case as a whole-GPU allocation from the kubelet device ids and skips the node-lock release and dmem cap that need a real Pod; other pending-pod lookup errors still fail Allocate.

Refs #18

Reproduced and verified on an MI325X node: a Pod with hami.io/webhook: ignore and schedulerName: default-scheduler failed admission before and now runs with HSA_CU_MASK, ROCR_VISIBLE_DEVICES and HIP_VISIBLE_DEVICES set.

AI assistance was used for this PR.

Allocate returned "no binding pod found" for a Pod that carries none of
HAMi's bind-time annotations (placed by another scheduler or alongside a
second device plugin), so the whole-GPU fallback from the kubelet device
ids was never reached and the Pod failed with UnexpectedAdmissionError.

Treat ErrNoPendingPod as that case: use an empty Pod, serve the kubelet ids
as whole GPUs, and skip the node-lock release and dmem cap that need a real
Pod. Other lookup errors still fail Allocate.

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: f8672788-e387-4f3d-9d2f-e88b1af4297a

  • 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 6dc5cef into main Oct 11, 2026
11 of 12 checks passed
@moezdil
moezdil deleted the fix/allocate-without-hami-pod branch October 11, 2026 11:39
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