Skip to content

Commit 6410ac3

Browse files
committed
Return when removePod failed
1 parent 6ff3b68 commit 6410ac3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/scheduler/internal/cache/cache.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,9 @@ func (cache *schedulerCache) AddPod(pod *v1.Pod) error {
407407
// The pod was added to a different node than it was assumed to.
408408
klog.Warningf("Pod %v was assumed to be on %v but got added to %v", key, pod.Spec.NodeName, currState.pod.Spec.NodeName)
409409
// Clean this up.
410-
cache.removePod(currState.pod)
410+
if err = cache.removePod(currState.pod); err != nil {
411+
klog.Errorf("removing pod error: %v", err)
412+
}
411413
cache.addPod(pod)
412414
}
413415
delete(cache.assumedPods, key)

0 commit comments

Comments
 (0)