Skip to content

Commit 862c8bf

Browse files
authored
Merge pull request kubernetes#85561 from cwdsuzhou/Nov/return_when_failed
Return when removePod failed
2 parents 94fa017 + 6410ac3 commit 862c8bf

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
@@ -469,7 +469,9 @@ func (cache *schedulerCache) AddPod(pod *v1.Pod) error {
469469
// The pod was added to a different node than it was assumed to.
470470
klog.Warningf("Pod %v was assumed to be on %v but got added to %v", key, pod.Spec.NodeName, currState.pod.Spec.NodeName)
471471
// Clean this up.
472-
cache.removePod(currState.pod)
472+
if err = cache.removePod(currState.pod); err != nil {
473+
klog.Errorf("removing pod error: %v", err)
474+
}
473475
cache.addPod(pod)
474476
}
475477
delete(cache.assumedPods, key)

0 commit comments

Comments
 (0)