Skip to content

Commit

Permalink
Merge pull request #2658 from wangyang0616/fix_podgroup_status_update
Browse files Browse the repository at this point in the history
The allocate phase only updates the podgroup in the pending state to the inqueue state
  • Loading branch information
volcano-sh-bot authored Jan 31, 2023
2 parents f4e3e58 + 8b37ea2 commit a53b724
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/scheduler/actions/allocate/allocate.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ func (alloc *Action) Execute(ssn *framework.Session) {

for _, job := range ssn.Jobs {
// If not config enqueue action, change Pending pg into Inqueue statue to avoid blocking job scheduling.
if !conf.EnabledActionMap["enqueue"] {
job.PodGroup.Status.Phase = scheduling.PodGroupInqueue
} else {
if conf.EnabledActionMap["enqueue"] {
if job.IsPending() {
klog.V(4).Infof("Job <%s/%s> Queue <%s> skip allocate, reason: job status is pending.",
job.Namespace, job.Name, job.Queue)
continue
}
} else if job.IsPending() {
klog.V(4).Infof("Job <%s/%s> Queue <%s> status update from pending to inqueue, reason: no enqueue action is configured.",
job.Namespace, job.Name, job.Queue)
job.PodGroup.Status.Phase = scheduling.PodGroupInqueue
}

if vr := ssn.JobValid(job); vr != nil && !vr.Pass {
Expand Down

0 comments on commit a53b724

Please sign in to comment.