containernetworking / cni

Container Network Interface - networking for Linux containers

Home Page:https://cni.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loopback with CNI Spec 1.0.0

ssbostan opened this issue · 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.

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.

What container runtime are you using?

Containerd. All components with the latest version.

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?

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.

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.