kuryr-kubernetes/kuryr_kubernetes/cni
Michał Dulko 24c4b351ea Remove the pod interface even if VIF is gone
It seems that latest crio versions moved removal of network namespace to
later in the container lifecycle. This means that sometimes the network
namespace of a container will hang after pod is already gone from the
API and Kuryr assigned it's VIF to another pod. This might cause VLAN ID
conflicts, but normally that's not an issue as kuryr-daemon is removing
interfaces from container namespace on CNI DEL.

It may however happen that if kuryr-daemon was down when CNI DEL
happened, the info about the VIF saved in KuryrPort will already be
gone. In that case we simply returned success to the CNI without doing
any unplugging. Now if the netns is not removed immediately after that
we might end up with VLAN ID conflicts.

This commit makes sure that even if VIF info is gone, kuryr-daemon will
at least attempt to remove the container interface from the container
netns. This should limit the problem.

Change-Id: Ie7d4966473c83554786e79aea0d28a26de902a66
Closes-Bug: 1892388
2020-08-26 15:16:59 +02:00
..
binding Remove the pod interface even if VIF is gone 2020-08-26 15:16:59 +02:00
daemon Pod annotations to KuryrPort CRD. 2020-07-29 23:50:17 +02:00
plugins Remove the pod interface even if VIF is gone 2020-08-26 15:16:59 +02:00
__init__.py Experimental CNI & VIFBridge binding 2016-12-05 18:05:22 +00:00
api.py Removing six library. 2020-02-28 14:45:46 +01:00
handlers.py Move vifs to 'status' in the KuryrPort CRD. 2020-08-12 17:39:45 +02:00
health.py Civilize logging 2020-07-03 15:09:52 +02:00
main.py Removing six library. 2020-02-28 14:45:46 +01:00
utils.py Basic Python 3 compatibility fixes 2019-11-22 09:19:14 +01:00