Skip to content

Commit

Permalink
Merge pull request #3002 from wangyang0616/cherry_pick_pipeline_pod_r…
Browse files Browse the repository at this point in the history
…eason

[cherry-pick for release-1.8] Fix: the task pipeline status is incompatible with cluster autoscaler
  • Loading branch information
volcano-sh-bot authored Jul 27, 2023
2 parents e54efd0 + 47fce9f commit 76a0f01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/scheduler/api/job_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,13 +653,13 @@ func (ji *JobInfo) TaskSchedulingReason(tid TaskID) (reason string, msg string)

msg = ji.JobFitErrors
switch status := ctx.Status; status {
case Allocated, Pipelined:
case Allocated:
// Pod is schedulable
msg = fmt.Sprintf("Pod %s/%s can possibly be assigned to %s", taskInfo.Namespace, taskInfo.Name, ctx.NodeName)
if status == Pipelined {
msg += " once resource is released"
}
return PodReasonSchedulable, msg
case Pipelined:
msg = fmt.Sprintf("Pod %s/%s can possibly be assigned to %s, once resource is released", taskInfo.Namespace, taskInfo.Name, ctx.NodeName)
return PodReasonUnschedulable, msg
case Pending:
if fe := ji.NodesFitErrors[tid]; fe != nil {
// Pod is not schedulable
Expand Down

0 comments on commit 76a0f01

Please sign in to comment.