ipam: Protect release from releasing alive IP
ipam: Protect release from releasing alive IP

It has been observed that kubelet calls CNI DELETE multiple times with
potentially stale CNI result information. This can lead to a race condition
where the initial CNI DELETE properly releases the IP in use which then gets
reused by a different pod. Any subsequent CNI DELETE with the stale IP will
then cause the IP of the live pod to be released. While the pod will continue
to function, the next scheduled pod will attempt to use that IP and
continuously fail to be scheduled due to a IP in use error.

This is a regression of commit ab61853 which introduced the ability for CNI
DELETE to release an IP even if the endpoint deletion fails which is required
to fix the race condition when the CNI binary gets killed in between allocating
an IP and creating the endpoint.

Fixes: ab61853ca3 ("cni: Release IP even when endpoint deletion fails")
Fixes: #10065

Signed-off-by: Thomas Graf <5f50a84c1fa3bcff146405017f36aec1a10a9e38@cilium.io>

michi-covalent/cilium,tgraf/cilium,cilium/cilium,cilium-team/cilium,tgraf/cilium,tklauser/cilium,michi-covalent/cilium,tgraf/cilium,tgraf/cilium,tgraf/cilium,tklauser/cilium,michi-covalent/cilium,tklauser/cilium,cilium/cilium,tklauser/cilium,cilium/cilium,tklauser/cilium,tgraf/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium-team/cilium,cilium/cilium,cilium/cilium