Skip to content

[release-1.13] fix(scheduler): latch PodGroup Completed phase to prevent quota re-reservation after Pods deleted - #6056

Merged
volcano-sh-bot merged 2 commits into
volcano-sh:release-1.13from
volcano-sh-bot:cherry-pick-5996-to-release-1.13
Oct 7, 2026
Merged

volcano-sh-bot merged 2 commits into
volcano-sh:release-1.13from
volcano-sh-bot:cherry-pick-5996-to-release-1.13

Conversation

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

This is an automated cherry-pick of #5996

yuanhuaiwang and others added 2 commits October 7, 2026 09:19
…servation after Pods deleted

Once a PodGroup reaches Completed, deleting its finished member Pods (TTL/GC/workload controller) caused getPodGroupPhase to recompute from an empty TaskStatusIndex and downgrade the phase back to Pending, after which the enqueue action re-admitted it to Inqueue and the capacity/proportion plugins reserved its MinResources queue quota again. Latch the Completed phase when all member tasks are gone so the dead group can never re-enter the queue.

Fixes part of volcano-sh#4195

Signed-off-by: yuanhuaiwang <yuanhuaiwang@users.noreply.github.com>
…minal

Address review feedback in volcano-sh#5996: pod deletion is not atomic and usually spans multiple scheduler sessions, so the previous latch (only when all tasks were removed) did not cover a partially deleted group, which was still downgraded to Pending/Inqueue and re-reserved its MinResources quota.

Latch the phase whenever the PodGroup is Completed and every remaining task is in a terminal state (Succeeded/Failed); the empty-task case is subsumed since the loop passes vacuously. Any remaining non-completed task still falls through to the normal recompute. Add regression tests for the partially deleted and failed-task cases.

Signed-off-by: huaiwang.yuan <huaiwang.yuan@transsion.com>
@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 7, 2026

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

/retest

@hajnalmt

hajnalmt commented Oct 7, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2026
@volcano-sh-bot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hajnalmt

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

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 7, 2026
@volcano-sh-bot
volcano-sh-bot merged commit b8abf6f into volcano-sh:release-1.13 Oct 7, 2026
16 of 17 checks passed
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants