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

Standalone PVC added as existing volume for VM is missing annotations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • CNV v4.21.0
    • CNV v4.18.23, CNV v4.21.0, CNV v4.19.15, CNV v4.20.3
    • Storage Platform
    • None
    • Quality / Stability / Reliability
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Low
    • Customer Reported
    • None

      Description of problem:

      A PVC added to a VM as a disk will be missing the annotations such as cdi.kubevirt.io/storage.contentType. This can break storage migrations via MTC, see https://issues.redhat.com/browse/MIG-1869

      Version-Release number of selected component (if applicable):
      4.18, 4.19, 4.20, 4.21

      How reproducible:
      Always

      Steps to Reproduce:
      1. Create a PVC

      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: disk-1
        namespace: homelab
      spec:
        accessModes:
          - ReadWriteMany
        volumeMode: Filesystem
        resources:
          requests:
            storage: 1Gi
      

      2. Virtual Machines -> Storage -> Disk -> Add -> Volume (add a volume already available on the cluster)

      3. Start VM and check PVC annotations

      # oc get pvc disk-1 -o yaml | yq '.metadata.annotations'
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"name":"disk-1","namespace":"homelab"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"1Gi"}},"volumeMode":"Filesystem"}}
      pv.kubernetes.io/bind-completed: "yes"
      pv.kubernetes.io/bound-by-controller: "yes"
      volume.beta.kubernetes.io/storage-provisioner: nfs.csi.k8s.io
      volume.kubernetes.io/storage-provisioner: nfs.csi.k8s.io

      Actual results:
      kubevirt annotations to indicate its a VM disk missing

      Expected results:
      Annotations added

              akalenyu Alex Kalenyuk
              rhn-support-gveitmic Germano Veit Michel
              Jenia Peimer Jenia Peimer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: