mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
also report scheduling_algorithm_duration_seconds metric when the pods is unschedulable
This commit is contained in:
parent
bacac25479
commit
78b4ab11d5
@ -149,6 +149,9 @@ func (sched *Scheduler) schedulingCycle(
|
|||||||
pod := podInfo.Pod
|
pod := podInfo.Pod
|
||||||
scheduleResult, err := sched.SchedulePod(ctx, fwk, state, pod)
|
scheduleResult, err := sched.SchedulePod(ctx, fwk, state, pod)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
defer func() {
|
||||||
|
metrics.SchedulingAlgorithmLatency.Observe(metrics.SinceInSeconds(start))
|
||||||
|
}()
|
||||||
if err == ErrNoNodesAvailable {
|
if err == ErrNoNodesAvailable {
|
||||||
status := framework.NewStatus(framework.UnschedulableAndUnresolvable).WithError(err)
|
status := framework.NewStatus(framework.UnschedulableAndUnresolvable).WithError(err)
|
||||||
return ScheduleResult{nominatingInfo: clearNominatedNode}, podInfo, status
|
return ScheduleResult{nominatingInfo: clearNominatedNode}, podInfo, status
|
||||||
|
Loading…
Reference in New Issue
Block a user