mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
commit
637394c539
@ -720,22 +720,22 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
|
|||||||
sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(internalqueue.AssignedPodDelete, nil)
|
sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(internalqueue.AssignedPodDelete, nil)
|
||||||
}
|
}
|
||||||
sched.handleSchedulingFailure(fwk, assumedPodInfo, fmt.Errorf("binding rejected: %w", err), SchedulerError, clearNominatedNode)
|
sched.handleSchedulingFailure(fwk, assumedPodInfo, fmt.Errorf("binding rejected: %w", err), SchedulerError, clearNominatedNode)
|
||||||
} else {
|
return
|
||||||
// Calculating nodeResourceString can be heavy. Avoid it if klog verbosity is below 2.
|
}
|
||||||
klog.V(2).InfoS("Successfully bound pod to node", "pod", klog.KObj(pod), "node", scheduleResult.SuggestedHost, "evaluatedNodes", scheduleResult.EvaluatedNodes, "feasibleNodes", scheduleResult.FeasibleNodes)
|
// Calculating nodeResourceString can be heavy. Avoid it if klog verbosity is below 2.
|
||||||
metrics.PodScheduled(fwk.ProfileName(), metrics.SinceInSeconds(start))
|
klog.V(2).InfoS("Successfully bound pod to node", "pod", klog.KObj(pod), "node", scheduleResult.SuggestedHost, "evaluatedNodes", scheduleResult.EvaluatedNodes, "feasibleNodes", scheduleResult.FeasibleNodes)
|
||||||
metrics.PodSchedulingAttempts.Observe(float64(podInfo.Attempts))
|
metrics.PodScheduled(fwk.ProfileName(), metrics.SinceInSeconds(start))
|
||||||
metrics.PodSchedulingDuration.WithLabelValues(getAttemptsLabel(podInfo)).Observe(metrics.SinceInSeconds(podInfo.InitialAttemptTimestamp))
|
metrics.PodSchedulingAttempts.Observe(float64(podInfo.Attempts))
|
||||||
|
metrics.PodSchedulingDuration.WithLabelValues(getAttemptsLabel(podInfo)).Observe(metrics.SinceInSeconds(podInfo.InitialAttemptTimestamp))
|
||||||
|
|
||||||
// Run "postbind" plugins.
|
// Run "postbind" plugins.
|
||||||
fwk.RunPostBindPlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost)
|
fwk.RunPostBindPlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost)
|
||||||
|
|
||||||
// At the end of a successful binding cycle, move up Pods if needed.
|
// At the end of a successful binding cycle, move up Pods if needed.
|
||||||
if len(podsToActivate.Map) != 0 {
|
if len(podsToActivate.Map) != 0 {
|
||||||
sched.SchedulingQueue.Activate(podsToActivate.Map)
|
sched.SchedulingQueue.Activate(podsToActivate.Map)
|
||||||
// Unlike the logic in scheduling cycle, we don't bother deleting the entries
|
// Unlike the logic in scheduling cycle, we don't bother deleting the entries
|
||||||
// as `podsToActivate.Map` is no longer consumed.
|
// as `podsToActivate.Map` is no longer consumed.
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user