Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-31804

LVMS: Enforce compatibility check when restoring snapshot and creating clone

XMLWordPrintable

    • Low
    • No
    • 3
    • False
    • Hide

      None

      Show
      None

      This is an LVMS Bug Report:

      Please create & attach a must-gather as indicated by this Guide to collect LVMS relevant data from the Cluster (linked to the latest version, use older versions of the documentation for older OCP releases as applicable

      Please make sure that you describe your storage configuration in detail. List all devices that you plan to work with for LVMS as well as any relevant machine configuration data to make it easier for an engineer to help out.

      Description of problem:

      TopoLVM assumes that the restored snapshot PV and cloned PV have the same storage class as the original PV. However, this assumption is not verified on PV creation. So, if a pod consumes a restored/cloned PV having a different storage class from the original PV, this pod is stuck when their creation. It's better to check the compatibility of storage classes on creating restored/cloned PV.

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

       

      Steps to Reproduce:

      The storage class of the original volume:
      
      allowVolumeExpansion: true
      apiVersion: storage.k8s.io/v1
      kind: StorageClass
      metadata:
      ...
        name: topolvm-provisioner
        resourceVersion: "824"
        uid: 1f7b786d-b734-431c-80c7-01690d1a30e5
      parameters:
        csi.storage.k8s.io/fstype: xfs
        topolvm.cybozu.com/device-class: ssd
      provisioner: topolvm.cybozu.com
      reclaimPolicy: Delete
      volumeBindingMode: WaitForFirstConsumer
      
      The storage class of the restored volume:
      
      allowVolumeExpansion: true
      apiVersion: storage.k8s.io/v1
      kind: StorageClass
      metadata:
      ...
        name: topolvm-provisioner-ext4
        resourceVersion: "228201"
        uid: 15773da3-2c54-468d-baff-2e61cdee0602
      parameters:
        csi.storage.k8s.io/fstype: ext4
        topolvm.cybozu.com/device-class: ssd
      provisioner: topolvm.cybozu.com
      reclaimPolicy: Delete
      volumeBindingMode: WaitForFirstConsumer 

      Actual results:

          Events:
        Type     Reason       Age                      From     Message
        ----     ------       ----                     ----     -------
        Warning  FailedMount  17m (x47 over 7h41m)     kubelet  Unable to attach or mount volumes: unmounted volumes=[my-volume], unattached volumes=[kube-api-access-znr7r my-volume]: timed out waiting for the condition
        Warning  FailedMount  8m8s (x153 over 7h39m)   kubelet  Unable to attach or mount volumes: unmounted volumes=[my-volume], unattached volumes=[my-volume kube-api-access-znr7r]: timed out waiting for the condition
        Warning  FailedMount  2m25s (x234 over 7h43m)  kubelet  MountVolume.SetUp failed for volume "pvc-690ad48b-bf34-4338-831f-c24fa6b8d32e" : rpc error: code = Internal desc = target device is already formatted with different filesystem: volume=5ee1e263-1654-4381-aa98-fff61052881a, current=xfs, new:ext4

      Expected results:

      It's better to check the compatibility of storage classes on creating restored/cloned PV.

      Additional info:

       

            sakbas@redhat.com Suleyman Akbas
            rh-ee-jmoller Jakob Moeller
            Rahul Deore Rahul Deore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: