Wrap all errors in pkg/scheduler

This commit is contained in:
Jie Shen
2021-01-28 09:13:40 +08:00
parent b418bc83db
commit f82e3c430c
10 changed files with 15 additions and 15 deletions

View File

@@ -195,7 +195,7 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error
func (f *Fit) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {
s, err := getPreFilterState(cycleState)
if err != nil {
return framework.NewStatus(framework.Error, err.Error())
return framework.AsStatus(err)
}
insufficientResources := fitsRequest(s, nodeInfo, f.ignoredResources, f.ignoredResourceGroups)