Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-33565

pod cannot be ready due to incompatible CNI versions

XMLWordPrintable

    • Critical
    • Yes
    • Proposed
    • True
    • Hide

      pod cannot be ready with wrong cni version

      Show
      pod cannot be ready with wrong cni version

      Description of problem:

      pod cannot be ready due to incompatible CNI versions, see: 
      
       Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_testpod1gjvg8_z1_1cdbb285-d4f4-4fbb-8e30-16933315aa65_0(8a7067a7914fbf21f0f083a97be5ac48aa562ecc21472780d4cc2af3e5b7784e): error adding pod z1_testpod1gjvg8 to CNI network "multus-cni-network": plugin type="multus-shim" name="multus-cni-network" failed (add): CmdAdd (shim): CNI request failed with status 400: 'ContainerID:"8a7067a7914fbf21f0f083a97be5ac48aa562ecc21472780d4cc2af3e5b7784e" Netns:"/var/run/netns/fd68f325-4141-49be-8840-a48e51c5b76d" IfName:"eth0" Args:"IgnoreUnknown=1;K8S_POD_NAMESPACE=z1;K8S_POD_NAME=testpod1gjvg8;K8S_POD_INFRA_CONTAINER_ID=8a7067a7914fbf21f0f083a97be5ac48aa562ecc21472780d4cc2af3e5b7784e;K8S_POD_UID=1cdbb285-d4f4-4fbb-8e30-16933315aa65" Path:"" ERRORED: error configuring pod [z1/testpod1gjvg8] networking: [z1/testpod1gjvg8/1cdbb285-d4f4-4fbb-8e30-16933315aa65:static-sriovnetwork]: error adding container to network "static-sriovnetwork": failed to set up IPAM plugin type "whereabouts" from the device "ens2f0": incompatible CNI versions; config is "1.0.0", plugin supports ["0.1.0" "0.2.0" "0.3.0" "0.3.1" "0.4.0"]    

      Version-Release number of selected component (if applicable):

          sriov-network-operator.v4.16.0-202405110441

      How reproducible:

          always

      Steps to Reproduce:

          1. Create cluster with sriov operator
          2. Create VF by snnp
          3. Create NAD by sriovnetwork as below
      
      # cat sriovnetwork-whereabouts
      apiVersion: sriovnetwork.openshift.io/v1
      kind: SriovNetwork
      metadata:
        name: static-sriovnetwork
        namespace: openshift-sriov-network-operator
      spec:
        ipam: |
          {
            "type": "whereabouts",
            "range":"10.31.0.0/30"
          }
        capabilities: |
          {
            "mac": true,
            "ips": true
          }
        spoofChk: "off"
        trust: "on"
        resourceName: e810
        networkNamespace: z1
      
      4.  the NAD generated cni version is 1.0.0
      # oc get network-attachment-definitions.k8s.cni.cncf.io -n z1 -o yaml
      apiVersion: v1
      items:
      - apiVersion: k8s.cni.cncf.io/v1
        kind: NetworkAttachmentDefinition
        metadata:
          annotations:
            k8s.v1.cni.cncf.io/resourceName: openshift.io/e810
          creationTimestamp: "2024-05-13T02:24:39Z"
          generation: 1
          name: static-sriovnetwork
          namespace: z1
          resourceVersion: "380833"
          uid: 62d05e42-24c0-4427-bcd7-77d02fce31fb
        spec:
          config: |-
            {
                "cniVersion": "1.0.0",
                "name": "static-sriovnetwork",
                "type": "sriov",
                "vlan": 0,
                "spoofchk": "off",
      
      5. Create test pod with above NAD network     

      Actual results:

            Warning  FailedCreatePodSandBox  25s   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_testpod1gjvg8_z1_1cdbb285-d4f4-4fbb-8e30-16933315aa65_0(8a7067a7914fbf21f0f083a97be5ac48aa562ecc21472780d4cc2af3e5b7784e): error adding pod z1_testpod1gjvg8 to CNI network "multus-cni-network": plugin type="multus-shim" name="multus-cni-network" failed (add): CmdAdd (shim): CNI request failed with status 400: 'ContainerID:"8a7067a7914fbf21f0f083a97be5ac48aa562ecc21472780d4cc2af3e5b7784e" Netns:"/var/run/netns/fd68f325-4141-49be-8840-a48e51c5b76d" IfName:"eth0" Args:"IgnoreUnknown=1;K8S_POD_NAMESPACE=z1;K8S_POD_NAME=testpod1gjvg8;K8S_POD_INFRA_CONTAINER_ID=8a7067a7914fbf21f0f083a97be5ac48aa562ecc21472780d4cc2af3e5b7784e;K8S_POD_UID=1cdbb285-d4f4-4fbb-8e30-16933315aa65" Path:"" ERRORED: error configuring pod [z1/testpod1gjvg8] networking: [z1/testpod1gjvg8/1cdbb285-d4f4-4fbb-8e30-16933315aa65:static-sriovnetwork]: error adding container to network "static-sriovnetwork": failed to set up IPAM plugin type "whereabouts" from the device "ens2f0": incompatible CNI versions; config is "1.0.0", plugin supports ["0.1.0" "0.2.0" "0.3.0" "0.3.1" "0.4.0"]
      

      Expected results:

          

      Additional info:

          should be caused by this changes https://github.com/openshift/sriov-network-operator/commit/ace40a0f6b8d32c34a05fc680130c1a358d90fbd

            bpickard@redhat.com Ben Pickard
            zzhao1@redhat.com Zhanqi Zhao
            Zhanqi Zhao Zhanqi Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: