tkestack / galaxy

Providing high-performance network for Kubernetes
Other
109 stars 39 forks source link

Fix a race condition that resync released ip due to pod uid missmatch #109

Closed chenchun closed 3 years ago

chenchun commented 3 years ago

It happens when deleting all pods of a tapp with immutable policy. Resync queries all ips firstly without holding a big lock and then it tries to hold a pod's lock to check status. But the lock is hold by the binding routine of the new pod, the binding routine updated the old pod uid to new pod uid and released the lock. Then resync holds the lock with the old pod uid attribute and finds it missmatches new pod's uid and calls unassign ip making the ip unreachable.