Skip to content

fix(binder): prevent duplicate reservation pods for a single gpu-group (#1693) [v0.12]#1702

Merged
gshaibi merged 1 commit into
v0.12from
backport-1693-to-v0.12
Jun 15, 2026
Merged

fix(binder): prevent duplicate reservation pods for a single gpu-group (#1693) [v0.12]#1702
gshaibi merged 1 commit into
v0.12from
backport-1693-to-v0.12

Conversation

@gshaibi

@gshaibi gshaibi commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

Backport of #1693 to the v0.12 release branch.

At scale with fractional GPU workloads, multiple GPU reservation pods could be created for a single runai-gpu-group on a node, each reserving a different physical GPU. Since the scheduler tracks fractional-GPU capacity by gpu-group, a group spanning two devices corrupts accounting — affected GPUs appear full, fractional pods stay pending, and the state does not self-correct.

Fix: reservation pods are named deterministically per (node, gpu-group) (hashed) and AlreadyExists on create is treated as success (reuse the existing pod), so concurrent, retried, and multi-replica creates collide on a single API-server object instead of duplicating. Existing reservation pods (old random-suffix names) are unaffected — they are still resolved by gpu-group label, so no migration is needed.

Related Issues

Fixes #1673

Checklist

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)

Breaking Changes

None.

Additional Notes

Cherry-pick of 73298061 from #1693 onto v0.12 (manual adjustments limited to conflict resolution: dropping the unused rand import and placing the new test / changelog entry into this branch's layout). Verified locally on v0.12: go build, go vet, gofmt, and the resourcereservation package tests (including the new duplicate-gpu-group race test) pass.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3bfdbb99-7822-494c-9506-caa82e521939

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport-1693-to-v0.12

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 and usage tips.

@gshaibi gshaibi enabled auto-merge (squash) June 15, 2026 15:08
@gshaibi gshaibi force-pushed the backport-1693-to-v0.12 branch from 2f868d1 to bac70d5 Compare June 15, 2026 19:24
@gshaibi gshaibi force-pushed the backport-1693-to-v0.12 branch from bac70d5 to 964e8b6 Compare June 15, 2026 19:31
@gshaibi gshaibi merged commit 6441ef4 into v0.12 Jun 15, 2026
9 of 10 checks passed
@gshaibi gshaibi deleted the backport-1693-to-v0.12 branch June 15, 2026 20:05
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.

2 participants