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

EBS io2: can't clone a dv Filesystem to Block

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • CNV v4.17.3
    • CNV v4.17.0
    • Storage Ecosystem
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.17.1.rhel9-12
    • ---
    • ---
    • Storage Core Sprint 263
    • None

      Description of problem:

      Can't clone DV FS to Block

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

      4.17

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create an FS DV, request 4Gi
      
      apiVersion: cdi.kubevirt.io/v1beta1
      kind: DataVolume
      metadata:
        name: dv-cirros-fs
        namespace: cdi-clone-test-clone
      spec:
        contentType: kubevirt
        source:
          http:
            certConfigMap: artifactory-configmap
            secretRef: cnv-tests-artifactory-secret
            url: https://<artifactory_server>/cirros-images/cirros-0.4.0-x86_64-disk.qcow2
        storage:
          resources:
            requests:
              storage: 4Gi
          storageClassName: io2-csi
          volumeMode: Filesystem
      
      For some reason, it created a 5Gi PVC:
      
      $ oc get pvc -n cdi-clone-test-clone dv-cirros-fs
      NAME           STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
      dv-cirros-fs   Bound    pvc-65fdf3d5-811a-4443-b30a-0f7db3a79b51   5Gi        RWO            io2-csi        <unset>                 5m3s
      
      
      PVC YAML:
      
      $ oc get pvc -n cdi-clone-test-clone dv-cirros-fs -oyaml
      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        annotations:
          cdi.Kubervirt.io/sourceCapacity: 5Gi
          cdi.Kubervirt.io/virtualSize: "4294967296"
          cdi.kubevirt.io/createdForDataVolume: 39d7a0e8-5e38-476b-b69a-b82f7cb36438
          cdi.kubevirt.io/storage.condition.running: "false"
          cdi.kubevirt.io/storage.condition.running.message: Import Complete
          cdi.kubevirt.io/storage.condition.running.reason: Completed
          cdi.kubevirt.io/storage.contentType: kubevirt
          cdi.kubevirt.io/storage.pod.phase: Succeeded
          cdi.kubevirt.io/storage.pod.restarts: "0"
          cdi.kubevirt.io/storage.populator.progress: 100.0%
          cdi.kubevirt.io/storage.preallocation.requested: "false"
          cdi.kubevirt.io/storage.usePopulator: "true"
          pv.kubernetes.io/bind-completed: "yes"
          pv.kubernetes.io/bound-by-controller: "yes"
          volume.beta.kubernetes.io/storage-provisioner: ebs.csi.aws.com
          volume.kubernetes.io/selected-node: ip-10-0-5-129.us-east-2.compute.internal
          volume.kubernetes.io/storage-provisioner: ebs.csi.aws.com
        creationTimestamp: "2024-10-08T09:44:16Z"
        finalizers:
        - kubernetes.io/pvc-protection
        labels:
          alerts.k8s.io/KubePersistentVolumeFillingUp: disabled
          app: containerized-data-importer
          app.kubernetes.io/component: storage
          app.kubernetes.io/managed-by: cdi-controller
          app.kubernetes.io/part-of: hyperconverged-cluster
          app.kubernetes.io/version: 4.17.0
        name: dv-cirros-fs
        namespace: cdi-clone-test-clone
        ownerReferences:
        - apiVersion: cdi.kubevirt.io/v1beta1
          blockOwnerDeletion: true
          controller: true
          kind: DataVolume
          name: dv-cirros-fs
          uid: 39d7a0e8-5e38-476b-b69a-b82f7cb36438
        resourceVersion: "83997"
        uid: 8385b26a-3a6b-473f-ba8d-6364cee283d7
      spec:
        accessModes:
        - ReadWriteOnce
        dataSource:
          apiGroup: cdi.kubevirt.io
          kind: VolumeImportSource
          name: volume-import-source-39d7a0e8-5e38-476b-b69a-b82f7cb36438
        dataSourceRef:
          apiGroup: cdi.kubevirt.io
          kind: VolumeImportSource
          name: volume-import-source-39d7a0e8-5e38-476b-b69a-b82f7cb36438
        resources:
          requests:
            storage: "4544938938"
        storageClassName: io2-csi
        volumeMode: Filesystem
        volumeName: pvc-65fdf3d5-811a-4443-b30a-0f7db3a79b51
      status:
        accessModes:
        - ReadWriteOnce
        capacity:
          storage: 5Gi
        phase: Bound
      
      
      4544938938 ~= 4.23 Gi
      2. Try cloning to Block DV (result is the same with 4Gi and 5Gi requested size)
      
      apiVersion: cdi.kubevirt.io/v1beta1
      kind: DataVolume
      metadata:
        annotations:
          cdi.kubevirt.io/storage.bind.immediate.requested: 'true'
        name: dv-5607-5gi
        namespace: cdi-clone-test-clone
      spec:
        source:
          pvc:
            name: dv-cirros-fs
            namespace: cdi-clone-test-clone
        storage:
          resources:
            requests:
              storage: 5Gi
          storageClassName: io2-csi
          volumeMode: Block
       
      
      Clone restarts:
      
      $ oc get dv -n cdi-clone-test-clone 
      NAME           PHASE             PROGRESS   RESTARTS   AGE
      dv-5607-5gi    CloneInProgress   N/A        4          2m33s
      dv-cirros-fs   Succeeded         100.0%                28m
      
      
      $ oc get pvc -n cdi-clone-test-clone
      NAME                                           STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   VOLUMEATTRIBUTESCLASS   AGE
      dv-5607-5gi                                    Pending                                                                        io2-csi        <unset>                 114s
      dv-cirros-fs                                   Bound     pvc-65fdf3d5-811a-4443-b30a-0f7db3a79b51   5Gi        RWO            io2-csi        <unset>                 27m
      tmp-pvc-e9eeae7f-484e-405f-b8c0-ff8fe9decc58   Bound     pvc-20c3f79b-e04a-42bb-b05f-38bb0bbcb7b8   5Gi        RWX            io2-csi        <unset>                 113s
      3. Source pod Errors:
      
      $ oc get pods -n cdi-clone-test-clone
      NAME                                                      READY   STATUS             RESTARTS       AGE
      20c3f79b-e04a-42bb-b05f-38bb0bbcb7b8-source-pod           0/1     Error              5 (87s ago)    2m56s
      cdi-upload-tmp-pvc-e9eeae7f-484e-405f-b8c0-ff8fe9decc58   1/1     Running            0              3m7s 
      Source pod log:
      
      $ oc logs -n cdi-clone-test-clone 20c3f79b-e04a-42bb-b05f-38bb0bbcb7b8-source-pod -p
      VOLUME_MODE=filesystem
      MOUNT_POINT=/var/run/cdi/clone/source
      /var/run/cdi/clone/source /
      Not preallocating filesystem, uploading only used bytes
      UPLOAD_BYTES=13725696
      I1008 10:13:10.982250      10 clone-source.go:224] content-type is "filesystem-clone"
      I1008 10:13:10.982314      10 clone-source.go:225] mount is "/var/run/cdi/clone/source"
      I1008 10:13:10.982318      10 clone-source.go:226] upload-bytes is 13725696
      I1008 10:13:10.982327      10 clone-source.go:243] Starting cloner target
      I1008 10:13:10.982376      10 clone-source.go:179] Executing /usr/bin/tar [cv -S disk.img]
      I1008 10:13:11.511495      10 clone-source.go:259] Set header to filesystem-clone
      F1008 10:13:11.553989      10 clone-source.go:268] Unexpected status code 500
      Upload pod log:
      
      $ oc logs -n cdi-clone-test-clone cdi-upload-tmp-pvc-e9eeae7f-484e-405f-b8c0-ff8fe9decc58
      I1008 10:10:17.892359       1 uploadserver.go:81] Running server on 0.0.0.0:8443
      I1008 10:10:21.485305       1 uploadserver.go:438] Content type header is "filesystem-clone"
      I1008 10:10:21.486307       1 file.go:264] copyWithSparseCheck to /dev/cdi-block-volume
      E1008 10:10:21.486542       1 file.go:282] Error zeroing range in destination file: operation not supported
      E1008 10:10:21.487303       1 uploadserver.go:452] Saving stream failed: operation not supported
      I1008 10:10:23.313320       1 uploadserver.go:438] Content type header is "filesystem-clone"
      I1008 10:10:23.314423       1 file.go:264] copyWithSparseCheck to /dev/cdi-block-volume
      E1008 10:10:23.314535       1 file.go:282] Error zeroing range in destination file: operation not supported
      E1008 10:10:23.317623       1 uploadserver.go:452] Saving stream failed: operation not supported
      I1008 10:10:37.768234       1 uploadserver.go:438] Content type header is "filesystem-clone"
      I1008 10:10:37.769347       1 file.go:264] copyWithSparseCheck to /dev/cdi-block-volume
      E1008 10:10:37.769457       1 file.go:282] Error zeroing range in destination file: operation not supported
      E1008 10:10:37.771007       1 uploadserver.go:452] Saving stream failed: operation not supported
      I1008 10:11:03.693177       1 uploadserver.go:438] Content type header is "filesystem-clone"
      I1008 10:11:03.694247       1 file.go:264] copyWithSparseCheck to /dev/cdi-block-volume
      E1008 10:11:03.694368       1 file.go:282] Error zeroing range in destination file: operation not supported
      E1008 10:11:03.696887       1 uploadserver.go:452] Saving stream failed: operation not supported
      I1008 10:11:48.519051       1 uploadserver.go:438] Content type header is "filesystem-clone"
      I1008 10:11:48.520151       1 file.go:264] copyWithSparseCheck to /dev/cdi-block-volume
      E1008 10:11:48.520271       1 file.go:282] Error zeroing range in destination file: operation not supported
      E1008 10:11:48.523188       1 uploadserver.go:452] Saving stream failed: operation not supported
      I1008 10:13:11.521449       1 uploadserver.go:438] Content type header is "filesystem-clone"
      I1008 10:13:11.522503       1 file.go:264] copyWithSparseCheck to /dev/cdi-block-volume
      E1008 10:13:11.522635       1 file.go:282] Error zeroing range in destination file: operation not supported
      E1008 10:13:11.553867       1 uploadserver.go:452] Saving stream failed: operation not supported

      Actual results:

      FS to Block clone fails

      Expected results:

      FS to Block clone succeeds 

      Additional info:

       

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

                Created:
                Updated:
                Resolved: