mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Fix small bug to avoid panic
This commit is contained in:
parent
a2b4fb9b33
commit
26482e3cfc
@ -161,7 +161,7 @@ func (cache *schedulerCache) ForgetPod(pod *v1.Pod) error {
|
||||
defer cache.mu.Unlock()
|
||||
|
||||
currState, ok := cache.podStates[key]
|
||||
if currState.pod.Spec.NodeName != pod.Spec.NodeName {
|
||||
if ok && currState.pod.Spec.NodeName != pod.Spec.NodeName {
|
||||
return fmt.Errorf("pod %v state was assumed on a different node", key)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user