From cb8a18632c9ab1d6e06532529eee29d00e46e53e Mon Sep 17 00:00:00 2001 From: w00568049 Date: Wed, 12 Jul 2023 21:07:00 +0800 Subject: [PATCH] The invalid interface is deleted and the log information is updated Signed-off-by: w00568049 --- pkg/scheduler/actions/allocate/allocate.go | 4 ++-- pkg/scheduler/actions/backfill/backfill.go | 4 ++-- pkg/scheduler/util/predicate_helper.go | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pkg/scheduler/actions/allocate/allocate.go b/pkg/scheduler/actions/allocate/allocate.go index eb0af30bec..1ad5a470a3 100644 --- a/pkg/scheduler/actions/allocate/allocate.go +++ b/pkg/scheduler/actions/allocate/allocate.go @@ -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) } @@ -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. diff --git a/pkg/scheduler/actions/backfill/backfill.go b/pkg/scheduler/actions/backfill/backfill.go index 780c14ca78..6f6847778b 100644 --- a/pkg/scheduler/actions/backfill/backfill.go +++ b/pkg/scheduler/actions/backfill/backfill.go @@ -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 @@ -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 } diff --git a/pkg/scheduler/util/predicate_helper.go b/pkg/scheduler/util/predicate_helper.go index 6895b86de4..ef7983f452 100644 --- a/pkg/scheduler/util/predicate_helper.go +++ b/pkg/scheduler/util/predicate_helper.go @@ -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 {