mirror of https://github.com/k3s-io/k3s
feat: move klog from AddUnschedulableIfNotPresent into the call site
parent
43ce2f17cf
commit
6382595221
|
@ -682,7 +682,9 @@ func MakeDefaultErrorFunc(client clientset.Interface, podQueue internalqueue.Sch
|
|||
pod, err := client.CoreV1().Pods(podID.Namespace).Get(podID.Name, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
if len(pod.Spec.NodeName) == 0 {
|
||||
podQueue.AddUnschedulableIfNotPresent(pod, podSchedulingCycle)
|
||||
if err := podQueue.AddUnschedulableIfNotPresent(pod, podSchedulingCycle); err != nil {
|
||||
klog.Error(err)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
|
@ -313,10 +313,7 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pod *v1.Pod, podSchedulingC
|
|||
// it to unschedulableQ.
|
||||
if p.moveRequestCycle >= podSchedulingCycle {
|
||||
if err := p.podBackoffQ.Add(pInfo); err != nil {
|
||||
// TODO: Delete this klog call and log returned errors at the call site.
|
||||
err = fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err)
|
||||
klog.Error(err)
|
||||
return err
|
||||
return fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err)
|
||||
}
|
||||
} else {
|
||||
p.unschedulableQ.addOrUpdate(pInfo)
|
||||
|
|
Loading…
Reference in New Issue