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

virtctl addVolume allows one to add an existing volume with a different name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • CNV v4.13.0
    • CNV v4.10.6, CNV v4.11.0, CNV v4.12.0
    • Storage Platform
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ---
    • ---
    • Storage Core Sprint 231
    • Medium
    • None

      If you have a VM named lets say `example` with this volumes defined:

              volumes:
              - dataVolume:
                  name: dv1
                name: datavolumedisk
              - cloudInitNoCloud:
                  userData: |-
                    #cloud-config
                    password: fedora
                    chpasswd: { expire: False }
                name: cloudinitdisk

      and then you will try to hotplug dv1 DV/PVC it will succeed and add dv1 as an extra volume with name dv1

      virtctl addvolume example --volume-name=dv1 --persist
      

      Ending with volume list of:

            volumes:
            - dataVolume:
                name: dv1
              name: datavolumedisk
            - cloudInitNoCloud:
                userData: |-
                  #cloud-config
                  password: fedora
                  chpasswd: { expire: False }
              name: cloudinitdisk
            - name: dv1
              persistentVolumeClaim:
                claimName: dv1
                hotpluggable: true

       

      I would expect the addvolume to reject trying to add the same DV/PVC with 2 different names in the VM volumes list.

              skagan@redhat.com Shelly Kagan
              skagan@redhat.com Shelly Kagan
              Kevin Alon Goldblatt Kevin Alon Goldblatt
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: