Description of problem: When cloning with volume mode file system, using storage API fails due to resizing. Version-Release number of selected component (if applicable): 4.10 How reproducible: 100% Steps to Reproduce: 1. Create DV with file system, using storage api: apiVersion: cdi.kubevirt.io/v1alpha1 kind: DataVolume metadata: name: <dv name> annotations: cdi.kubevirt.io/storage.bind.immediate.requested: "true" spec: storage: resources: requests: storage: 38Gi storageClassName: hostpath-provisioner source: http: url: <os image> 2. Create clone apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: name: dest-dv spec: source: pvc: name: <DV NAME> namespace: <DV NAMESPACE> storage: resources: requests: storage: 38Gi storageClassName: hostpath-provisioner contentType: kubevirt Actual results: clone fails: The request is invalid: spec.source.PVC: target resources requests storage size is smaller than the source Expected results: DV created. Additional info: Same clone using PVC API pass
Bartosz, please take a look.
Confirmed a problem exists, can easily recreate. Validation webhook compares real PVC size of source volume with the requested size on spec.storage. Need to think how to correctly solve it, so it works for all cases (for example, when source filesystem has different overhead than target filesystem).
Peter, this is affecting the automatic boot source update feature. Can you please approve blocker for it?
verified on: CNV 4.10
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Virtualization 4.10.0 Images security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0947