fix(scheduler): enforce PodSet gang admission floor - #2096
Open
nvyutwu wants to merge 1 commit into
Open
Conversation
nvyutwu
marked this pull request as ready for review
August 23, 2026 04:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
GetTasksToAllocatedocuments that task collection respectsminAvailable, but a PodSet below its admission floor currently returns every eligible task in the priority queue up to the remaining requirement. If a caller consumes that under-filled list, checkpoint/rollback is atomic only over the partial list.This change makes the shared collector return no tasks until enough eligible tasks exist to satisfy the PodSet's remaining
minAvailablerequirement. Once the PodSet is admitted, existing elastic behavior is unchanged and continues to return at most one additional task.The allocate action already filters jobs through
IsReadyForScheduling. This patch preserves that guard and enforces the same invariant at the lower-level collection boundary used by other scheduler paths.This is independent of and complementary to #2095, which fixes namespace collisions in PodGroup identity and membership.
Related Issues
N/A. Production investigation: https://reports-a3ad46.gitlab-master-pages.nvidia.com/reports/kai-clique-pinning-prd11/report.html
Checklist
make changelogBreaking Changes
None.
Additional Notes
Pre-fix red test:
minAvailable=2, one pending task: returned 1, expected 0minAvailable=4, three pending tasks: returned 3, expected 0minAvailable=4, two allocated and one pending task: returned 1, expected 0 because two remaining members are requiredPost-fix validation on linux/amd64:
go test ./pkg/scheduler/api/podgroup_info -count=1go test ./pkg/scheduler/... -timeout 30m -count=1go vet ./...make lint-go(0 issues)make build-go-amd SERVICE_NAME=schedulerNo physical GPU is required for these scheduler-state tests.