Skip to content

Commit

Permalink
Fix PodTopologySpread in predicate
Browse files Browse the repository at this point in the history
Signed-off-by: Box Zhang <wszwbsddbk@gmail.com>
  • Loading branch information
bibibox committed Dec 16, 2024
1 parent a392818 commit 395eb7c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/scheduler/plugins/predicates/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,12 @@ func (pp *predicatesPlugin) OnSessionOpen(ssn *framework.Session) {
status := podTopologySpreadFilter.Filter(context.TODO(), state, task.Pod, nodeInfo)
podTopologyStatus := api.ConvertPredicateStatus(status)
if podTopologyStatus.Code != api.Success {
// TODO: Currently, preemption is not supported when Pod Topology Spread filtering fails.
// Once supported, the logic here should be removed.
// See https://github.com/volcano-sh/volcano/issues/3845
podTopologyStatus.Code = api.UnschedulableAndUnresolvable
predicateStatus = append(predicateStatus, podTopologyStatus)
if ShouldAbort(podTopologyStatus) {
return api.NewFitErrWithStatus(task, node, predicateStatus...)
}
return api.NewFitErrWithStatus(task, node, predicateStatus...)
}
}
}
Expand Down

0 comments on commit 395eb7c

Please sign in to comment.