cni icon indicating copy to clipboard operation
cni copied to clipboard

Loopback with CNI Spec 1.0.0

Open ssbostan opened this issue 2 years ago • 6 comments

Hello everyone, I used the following code to config loopback, but it doesn't work with SPEC 1.0.0.

{
    "cniVersion": "1.0.0",
    "name": "lo",
    "plugins": [
        {
            "type": "loopback"
        }
    ]
}

Loopback supports v1.0.0 spec?

Thanks.

ssbostan avatar Jan 26 '23 15:01 ssbostan

Here is the error:

Jan 26 16:00:17 node006 kubelet[2229]: I0126 16:00:17.660868    2229 remote_runtime.go:620] "[RemoteRuntimeService] Status Response" status="&RuntimeStatus{Conditions:[]*RuntimeCondition{&RuntimeCondition{Type:RuntimeReady,Status:true,Reason:,Message:,},&RuntimeCondition{Type:NetworkReady,Status:false,Reason:NetworkPluginNotReady,Message:Network plugin returns error: cni plugin not initialized,},},}"
Jan 26 16:00:17 node006 kubelet[2229]: I0126 16:00:17.661033    2229 kubelet.go:2468] "Container runtime status" status="Runtime Conditions: RuntimeReady=true reason: message:, NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"
Jan 26 16:00:17 node006 kubelet[2229]: E0126 16:00:17.661094    2229 kubelet.go:2475] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized"

If I use Spec 0.4.0, it works, but Spec 1.0.0 not works.

ssbostan avatar Jan 26 '23 16:01 ssbostan

What container runtime are you using?

MikeZappa87 avatar Feb 23 '23 22:02 MikeZappa87

Containerd. All components with the latest version.

ssbostan avatar Feb 24 '23 13:02 ssbostan

containerd already includes the loopback plugin in the go-cni library. Adding the loopback again just results in it calling loopback twice. What are you trying to do?

MikeZappa87 avatar Feb 24 '23 15:02 MikeZappa87

I configured Kubelet + Containerd, but Kubelet with spec 1.0.0 did not become ready. With 0.4.0 was OK. I tested the configuration of the spec and it's OK, but it doesn't work with Kubelet and Containerd. As you can see in the above log, it said cni plugin not initialized.

ssbostan avatar Feb 25 '23 21:02 ssbostan

In containerd, its included: https://github.com/containerd/go-cni/blob/6603d5bd8941d7f2026bb5627f6aa4ff434f859a/opts.go#L88

A lot of discussion around loopback. At one point we wanted to deprecate the plugin as a whole.

MikeZappa87 avatar Feb 26 '24 17:02 MikeZappa87