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

[2219143] [hot-plug] No error message when attempting to hot-plugging the same interface again

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • None
    • CNV Network
    • Moderate
    • None

      Description of problem:
      When attempting to hot-plug an interface, that was already hot-plugged (i.e. same interface name), there is no error message, so it gives the impression that the action succeeeds.

      Version-Release number of selected component (if applicable):
      Client Version: version.Info

      {GitVersion:"v1.0.0-beta.0-449-g2d9380079", GitCommit:"2d93800792c87fd0f744a13f80ce82260dd6e279", GitTreeState:"clean", BuildDate:"2023-06-28T15:10:11Z", GoVersion:"go1.19.9", Compiler:"gc", Platform:"linux/amd64"}

      Server Version: version.Info

      {GitVersion:"v1.0.0-beta.0-449-g2d9380079", GitCommit:"2d93800792c87fd0f744a13f80ce82260dd6e279", GitTreeState:"clean", BuildDate:"2023-06-28T15:10:09Z", GoVersion:"go1.19.9", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:
      Always

      Steps to Reproduce:
      1. Create and run a basic VM (no secondary NICs).
      $ oc create ns yoss-ns
      namespace/yoss-ns created
      $ oc project yoss-ns
      Now using project "yoss-ns" on server "https://api.net-ys-414o.rhos-psi.cnv-qe.rhood.us:6443".
      $ oc apply -f vm-fedora.yaml
      virtualmachine.kubevirt.io/vm-fedora created
      $ virtctl start vm-fedora
      VM vm-fedora was scheduled to start

      2. Create a bridge interface over one of the nodes secondary NICs using a NodeNetworkConfigurationPolicy.
      $ oc apply -f nncp-linux-bridge.yaml
      oc get nncp -w
      nodenetworkconfigurationpolicy.nmstate.io/hotplug-linux-bridge created
      ysegev@ysegev-fedora (hotplug) $ oc get nncp -w
      NAME STATUS REASON
      hotplug-linux-bridge
      hotplug-linux-bridge Progressing ConfigurationProgressing
      hotplug-linux-bridge Progressing ConfigurationProgressing
      ...
      hotplug-linux-bridge Available SuccessfullyConfigured

      3. Create a NetworkattachmentDefinition for the bridge.
      $ oc apply -f bridge-nad.yaml
      networkattachmentdefinition.k8s.cni.cncf.io/hp-br-nad created

      4. Run the command to add the new interface to the VM:
      $ virtctl addinterface vm-fedora --network-attachment-definition-name hp-br-nad --name hp2

      5. Repeat the last command again:
      $ virtctl addinterface vm-fedora --network-attachment-definition-name hp-br-nad --name hp2

      Actual results:
      No failure message, looks like the question succeeds.

      Expected results:
      Alerting the user that the interface already exists.

      Additional info:
      In action nothing happens - no new entry is created in the VM spec in either `networks` and `interfaces`.

              phoracek@redhat.com Petr Horacek
              ysegev@redhat.com Yoss Segev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: