Skip to content

Commit

Permalink
The invalid interface is deleted and the log information is updated
Browse files Browse the repository at this point in the history
Signed-off-by: w00568049 <wangyang289@huawei.com>
  • Loading branch information
wangyang0616 committed Jul 13, 2023
1 parent b3ac598 commit cb8a186
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pkg/scheduler/actions/allocate/allocate.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (alloc *Action) Execute(ssn *framework.Session) {
var statusSets util.StatusSets
statusSets, err := ssn.PredicateFn(task, node)
if err != nil {
return nil, fmt.Errorf("allocate predicates failed for task <%s/%s> on node <%s>: %v",
return nil, fmt.Errorf("predicates failed in allocate for task <%s/%s> on node <%s>: %v",
task.Namespace, task.Name, node.Name, err)
}

Expand Down Expand Up @@ -229,7 +229,7 @@ func (alloc *Action) Execute(ssn *framework.Session) {
metrics.UpdateE2eSchedulingLastTimeByJob(job.Name, string(job.Queue), job.Namespace, time.Now())
}
} else {
klog.V(3).Infof("Predicates failed for task <%s/%s> on node <%s> with limited resources",
klog.V(3).Infof("Predicates failed in allocate for task <%s/%s> on node <%s> with limited resources",
task.Namespace, task.Name, node.Name)

// Allocate releasing resource to the task if any.
Expand Down
4 changes: 2 additions & 2 deletions pkg/scheduler/actions/backfill/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (backfill *Action) Execute(ssn *framework.Session) {
var statusSets util.StatusSets
statusSets, err := ssn.PredicateFn(task, node)
if err != nil {
klog.V(3).Infof("backfill predicates failed for task <%s/%s> on node <%s>: %v",
klog.V(3).Infof("predicates failed in backfill for task <%s/%s> on node <%s>: %v",
task.Namespace, task.Name, node.Name, err)
fe.SetNodeError(node.Name, err)
continue
Expand All @@ -88,7 +88,7 @@ func (backfill *Action) Execute(ssn *framework.Session) {
statusSets.ContainsErrorSkipOrWait() {
err := fmt.Errorf("predicates failed in backfill for task <%s/%s> on node <%s>, status is not success",
task.Namespace, task.Name, node.Name)
klog.V(3).Infof("err: %v", err)
klog.V(3).Infof("%v", err)
fe.SetNodeError(node.Name, err)
continue
}
Expand Down
6 changes: 0 additions & 6 deletions pkg/scheduler/util/predicate_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ func NewPredicateHelper() PredicateHelper {
return &predicateHelper{taskPredicateErrorCache: map[string]map[string]error{}}
}

type PredicateStatus interface {
IsContainsUnschedulable() bool
IsContainsUnschedulableAndUnresolvable() bool
IsContainsErrorSkipOrWait() bool
}

type StatusSets []*api.Status

func (s StatusSets) ContainsUnschedulable() bool {
Expand Down

0 comments on commit cb8a186

Please sign in to comment.