Skip to content

Commit

Permalink
The pipeline pod fails to be scheduled in the current scheduling peri…
Browse files Browse the repository at this point in the history
…od. It is more reasonable to set reason to Unschedulable and compatible with autoscaler capacity expansion

Signed-off-by: w00568049 <[email protected]>
  • Loading branch information
wangyang0616 committed Jul 27, 2023
1 parent a7f04a9 commit e332582
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 e332582

Please sign in to comment.