Commit 765ede7b authored by Mengxin Liu's avatar Mengxin Liu Committed by oilbeater
Browse files

fix: serialize pod add/delete order

(cherry picked from commit edaf41e0)
parent 78dc1fbf
Showing with 2 additions and 1 deletion
+2 -1
......@@ -536,7 +536,8 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
c.podKeyMutex.Lock(key)
defer c.podKeyMutex.Unlock(key)
if pod != nil && pod.DeletionTimestamp == nil && isPodAlive(pod) {
p, _ := c.podsLister.Pods(pod.Namespace).Get(pod.Name)
if p != nil && p.UID != pod.UID {
// Pod with same name exists, just return here
return nil
}
......
Supports Markdown
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