mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #126534 from googs1025/scheduler_cleanup
scheduler: use logger instead of new klog.FromContext(ctx)
This commit is contained in:
commit
5e2cead785
@ -1080,7 +1080,6 @@ func (sched *Scheduler) handleSchedulingFailure(ctx context.Context, fwk framewo
|
||||
// and the time the scheduler receives a Pod Update for the nominated pod.
|
||||
// Here we check for nil only for tests.
|
||||
if sched.SchedulingQueue != nil {
|
||||
logger := klog.FromContext(ctx)
|
||||
sched.SchedulingQueue.AddNominatedPod(logger, podInfo.PodInfo, nominatingInfo)
|
||||
}
|
||||
|
||||
@ -1097,7 +1096,7 @@ func (sched *Scheduler) handleSchedulingFailure(ctx context.Context, fwk framewo
|
||||
Reason: reason,
|
||||
Message: errMsg,
|
||||
}, nominatingInfo); err != nil {
|
||||
klog.FromContext(ctx).Error(err, "Error updating pod", "pod", klog.KObj(pod))
|
||||
logger.Error(err, "Error updating pod", "pod", klog.KObj(pod))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user