Unverified Commit a1588cfe authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #77478 from draveness/feature/remove-log-in-scheduler

feat: remove klog in AddUnschedulableIfNotPresent
parents 43284ecb 63825952
...@@ -682,7 +682,9 @@ func MakeDefaultErrorFunc(client clientset.Interface, podQueue internalqueue.Sch ...@@ -682,7 +682,9 @@ func MakeDefaultErrorFunc(client clientset.Interface, podQueue internalqueue.Sch
pod, err := client.CoreV1().Pods(podID.Namespace).Get(podID.Name, metav1.GetOptions{}) pod, err := client.CoreV1().Pods(podID.Namespace).Get(podID.Name, metav1.GetOptions{})
if err == nil { if err == nil {
if len(pod.Spec.NodeName) == 0 { if len(pod.Spec.NodeName) == 0 {
podQueue.AddUnschedulableIfNotPresent(pod, podSchedulingCycle) if err := podQueue.AddUnschedulableIfNotPresent(pod, podSchedulingCycle); err != nil {
klog.Error(err)
}
} }
break break
} }
......
...@@ -313,10 +313,7 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pod *v1.Pod, podSchedulingC ...@@ -313,10 +313,7 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pod *v1.Pod, podSchedulingC
// it to unschedulableQ. // it to unschedulableQ.
if p.moveRequestCycle >= podSchedulingCycle { if p.moveRequestCycle >= podSchedulingCycle {
if err := p.podBackoffQ.Add(pInfo); err != nil { if err := p.podBackoffQ.Add(pInfo); err != nil {
// TODO: Delete this klog call and log returned errors at the call site. return fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err)
err = fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err)
klog.Error(err)
return err
} }
} else { } else {
p.unschedulableQ.addOrUpdate(pInfo) p.unschedulableQ.addOrUpdate(pInfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment