mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Remove duplicated error log in framework
This commit is contained in:
parent
c241a237f9
commit
b9ab8768b6
@ -435,9 +435,7 @@ func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state *framewor
|
||||
if status.IsUnschedulable() {
|
||||
return status
|
||||
}
|
||||
err := status.AsError()
|
||||
klog.ErrorS(err, "Failed running PreFilter plugin", "plugin", pl.Name(), "pod", klog.KObj(pod))
|
||||
return framework.AsStatus(fmt.Errorf("running PreFilter plugin %q: %w", pl.Name(), err)).WithFailedPlugin(pl.Name())
|
||||
return framework.AsStatus(fmt.Errorf("running PreFilter plugin %q: %w", pl.Name(), status.AsError())).WithFailedPlugin(pl.Name())
|
||||
}
|
||||
}
|
||||
|
||||
@ -699,9 +697,7 @@ func (f *frameworkImpl) RunPreScorePlugins(
|
||||
for _, pl := range f.preScorePlugins {
|
||||
status = f.runPreScorePlugin(ctx, pl, state, pod, nodes)
|
||||
if !status.IsSuccess() {
|
||||
err := status.AsError()
|
||||
klog.ErrorS(err, "Failed running PreScore plugin", "plugin", pl.Name(), "pod", klog.KObj(pod))
|
||||
return framework.AsStatus(fmt.Errorf("running PreScore plugin %q: %w", pl.Name(), err))
|
||||
return framework.AsStatus(fmt.Errorf("running PreScore plugin %q: %w", pl.Name(), status.AsError()))
|
||||
}
|
||||
}
|
||||
|
||||
@ -751,7 +747,6 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state *framework.Cy
|
||||
}
|
||||
})
|
||||
if err := errCh.ReceiveError(); err != nil {
|
||||
klog.ErrorS(err, "Failed running Score plugins", "pod", klog.KObj(pod))
|
||||
return nil, framework.AsStatus(fmt.Errorf("running Score plugins: %w", err))
|
||||
}
|
||||
|
||||
@ -770,7 +765,6 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state *framework.Cy
|
||||
}
|
||||
})
|
||||
if err := errCh.ReceiveError(); err != nil {
|
||||
klog.ErrorS(err, "Failed running Normalize on Score plugins", "pod", klog.KObj(pod))
|
||||
return nil, framework.AsStatus(fmt.Errorf("running Normalize on Score plugins: %w", err))
|
||||
}
|
||||
|
||||
@ -792,7 +786,6 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state *framework.Cy
|
||||
}
|
||||
})
|
||||
if err := errCh.ReceiveError(); err != nil {
|
||||
klog.ErrorS(err, "Failed applying score defaultWeights on Score plugins", "pod", klog.KObj(pod))
|
||||
return nil, framework.AsStatus(fmt.Errorf("applying score defaultWeights on Score plugins: %w", err))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user