This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 348
cri-containerd cannot create a pod if the runtime removes the IP from the veth device #524
Labels
Comments
@nlacasse I think what you are asking here makes sense. @Random-Liu WDYT ? |
Since IP of a pod is considered to be immutable, I think it's reasonable to cache the IP after create the sandbox. @abhi Thanks for doing that, we should get that in v1.0.0-beta.1. However, I'm not sure whether runtime should rely on this behavior or not. They are today, but we might want to find a better solution which doesn't make implication on the cri container runtime implementation detail. :) @nlacasse Thanks for looking into this and find the root cause! :D |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Some runtimes create a TAP device linked to the virtual ethernet (veth) device, and then remove the IP address from the veth device. For example, clear containers takes this approach, as documented here.
On each PodSandboxStatus request, cri-containerd runs ocicni.GetPodNetworkStatus, which joins the pod's network namespace and looks for the IP address of the veth device. If this IP has been removed, GetPodNetworkStatus returns an error, and cri-containerd returns a status with an empty Network.Ip field. Kubelet detects this, and stops and re-starts the pod, but the same issue will occur again.
Cri-o does not have this problem, since it only calls GetPodNetworkStatus once (before the IP has been removed from the veth device), and caches the results.
The text was updated successfully, but these errors were encountered: