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

[2242316] After upgrade, CNV 4.13.4 -> 4.14.0 - OS DataSource(s) are not available (if the default storage class was changed to OCS before the upgrade, but images were not re-imported)

XMLWordPrintable

    • Storage Core Sprint 248, Storage Core Sprint 250
    • High
    • No

      Description of problem:
      After upgrade, CNV 4.13.4 -> 4.14.0 - OS DataSource(s) are not available (if the default storage class was changed to OCS before the upgrade, but images were not re-imported)

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

      How reproducible:
      Had only one upgrade run 

      Steps to Reproduce:

      1. Before upgrade:  
      Default SC is HPP, boot source images are imported to HPP PVCs (DV garbage collection enabled)
      Change the default storage class to OCS
      Delete some boot source images PVCs, they will re-import to OCS PVCs

      2. Upgrade CNV to 4.14.0

      3. See the result:

      OCS PVCs got deleted, VolumeSnapshots were created instead, DataSources are Available (as expected)

      HPP PVCs stayed 

      $ oc get pvc -n openshift-virtualization-os-images
      NAME                          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS         AGE
      centos7-680e9b4e0fba          Bound    pvc-6d5bb6c7-9e75-44ba-8467-5dbbbfef209c   229Gi      RWO            hostpath-csi-basic   3d3h
      rhel8-2cde3f47f8c7            Bound    pvc-8ba0f5c2-7740-4cc8-a7d1-c749919108e0   229Gi      RWO            hostpath-csi-basic   3d3h
      rhel9-a1947a1edca5            Bound    pvc-6f39c915-b049-4574-9627-bcba9c7c34f4   229Gi      RWO            hostpath-csi-basic   3d3h

      But their DataSources are not Ready (attaching the UI screenshot)

      $ oc get DataSource -n openshift-virtualization-os-images rhel8 -oyaml
      ....
      status:
        conditions:
        - lastHeartbeatTime: "2023-10-04T13:23:08Z"
          lastTransitionTime: "2023-10-04T13:23:08Z"
          message: Snapshot not found
          reason: NotFound
          status: "False"
          type: Ready
        source:
          snapshot:
            name: rhel8-2cde3f47f8c7
            namespace: openshift-virtualization-os-images

      Actual results:
      HPP PVCs are there, but DataSources are not Ready and not Available in UI

      Expected results:
      All DataSources are Ready and Available

      Additional info:
      To fix this: 
      1. Delete the PVCs in openshift-virtualization-os-images namespace
      2. Trigger DataImportCron reconciliation (can add any annotation to the object) or just wait until the DataImportCron will start the next scheduled import.   
      $ oc edit DataImportCron -n openshift-virtualization-os-images rhel8-image-cron

      This will trigger importing of the images to OCS DVs/PVCs and then converting them to VolumeSnapshots, and the DataSource will become Available

              akalenyu Alex Kalenyuk
              jpeimer@redhat.com Jenia Peimer
              Jenia Peimer Jenia Peimer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: