Skip to content

Host assisted clone should adjust requested storage when cloning from block to filesystem volume mode #3900

@gaohoward

Description

@gaohoward

What happened:
When cloning from a source, the host cloner should check the requested size for
the target tmp pvc if the tmp source pvc is of block volume mode and the
target pvc is of filesystem volume mode because it should take filesystem
overhead into consideration and enlarge the original request size accordingly
before creating the tmp pvc.

Because currently the check is missing the cloning will fail on validation.

What you expected to happen:
The cloning should be successful.

How to reproduce it (as minimally and precisely as possible):
Steps to reproduce the behavior.

  1. create a volume snapshot and make sure the VolumeSnapshotContent spec.sourceVolumeMode is Block.
  2. create a DV that clone from the snapshot, for example

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
annotations:
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
name: cloned-datavolume
namespace: default
spec:
source:
snapshot:
namespace: golden-ns
name: golden-volumesnapshot
storage:
storageClassName: hostpath-csi
resources: {}

  1. Observe that the clone never finishes.

Additional context:Add any other context about the problem here.

Environment:

  • CDI version (use kubectl get deployments cdi-deployment -o yaml): N/A
  • Kubernetes version (use kubectl version): N/A
  • DV specification: N/A
  • Cloud provider or hardware configuration: N/A
  • OS (e.g. from /etc/os-release): N/A
  • Kernel (e.g. uname -a): N/A
  • Install tools: N/A
  • Others: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions