Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-23958

[2158424] Cannot select Network Attachment Definitions from the global namespaces

XMLWordPrintable

    • High

      Description of problem:
      When the user wants to add a secondary interface to a VM using the UI, he/she must specify which is the name of the network attachment definition to use, as per [0].

      The current implementation only shows NADs (network attachment definitions) from the namespace of the VMI; however, there is a feature in multus (which is being used in openshift) where some namespaces are globally available to the user (i.e. the user can refer to NADs in these global namespaces, even if the VM is going to be created in a different namespace) - [1].

      To keep this consistent, the UI should present the NADs present in these global namespaces as well - the list is configured by the cluster networks operator, and can be seen in [2].

      When

      [0] - https://access.redhat.com/documentation/en-us/openshift_container_platform/4.11/html/virtualization/virtual-machines#virt-networking-wizard-fields-web_virt-create-vms

      [1] - https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/how-to-use.md # search for `--global-namespaces`

      [2] - https://github.com/openshift/cluster-network-operator/blob/6abbcaf40079f0ac39182d6fbc960403a2698475/bindata/network/multus/multus.yaml#L163

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

      How reproducible:
      Always.

      Steps to Reproduce:
      1. Provision the following net-attach-def (notice it is being created in the `default` namespace).
      ```
      apiVersion: v1
      items:

      • apiVersion: k8s.cni.cncf.io/v1
        kind: NetworkAttachmentDefinition
        metadata:
        annotations:
        description: VLAN 104 (10.11.176.0/24)
        k8s.v1.cni.cncf.io/resourceName: bridge.network.kubevirt.io/br-cnv
        name: vlan104
        namespace: default
        spec:
        config: '{"name":"vlan104","type":"cnv-bridge","cniVersion":"0.3.1","bridge":"br-cnv","vlan":104,"macspoofchk":false,"ipam":{}}'
        ```

      2. Try to consume this NAD when creating a VM using the wizard
      3.

      Actual results:
      The NAD created in this global namespace will not be listed in the UI.

      Expected results:
      The NAD created in this global namespace should be listed in the UI.

      Additional info:

            mschatzm@redhat.com Matan Schatzman
            mdbarroso Miguel Duarte de Mora Barroso (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: