Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device-info-spec missing in network-status when using the "plugins" filed in the NAD's CNI Spec. #50

Open
joelcheison opened this issue Nov 22, 2022 · 1 comment

Comments

@joelcheison
Copy link

joelcheison commented Nov 22, 2022

The device-info spec appears in the pod's network-status annotation when the NAD config only contains a single plugin using the "type" filed in the cni spec.

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  annotations:
    k8s.v1.cni.cncf.io/resourceName: intel.com/pci_sriov_net_f1
  name: test-net
  namespace: test
spec:
  config: '{
    "cniVersion": "0.3.1",
    "name": "test",
    **"type": "sriov",**

However when the "plugins" list of the cni spec (https://github.com/containernetworking/cni/blob/main/SPEC.md) is used for the NAD to invoke more than one plugin in a NAD, the device-info-spec is missing in the pod network-status annotation

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  annotations:
    k8s.v1.cni.cncf.io/resourceName: intel.com/pci_sriov_net_f1
  name: test-net
  namespace: test
spec:
  config: '{
   "cniVersion" : "0.3.1",
   "name" : "networking-f1c",
   **"plugins" : [**
      {
         "ipam" : {
            "type" : "static"
         },
         "name" : "test",
         **"type" : "sriov",**
         "vlan" : 821,
         "spoofchk": "on",
         "trust":"off",
         "link_state": "auto"
      },
      {
         **"type": "tuning"**,
         "sysctl": { 
            "net.ipv6.conf.test.disable_ipv6": "1"
         }
       }
   ]
}'
@phoracek
Copy link
Member

phoracek commented Nov 22, 2022

@joelcheison thanks for reporting this. I believe that the annotation is set through Multus, this library serves only as a way to access the API. Correct me if the code impressible of deciding when to set device-info is invoked lives in this repo. Perhaps this should be open on the SR-IOV plugin or Multus itself.

CC @s1061123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants