Bug 2203278 - [4.12] Snapshot clone doesn't handle CSI drivers that have 0 in restoreSize of a snapshot properly
Summary: [4.12] Snapshot clone doesn't handle CSI drivers that have 0 in restoreSize o...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.12.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.12.4
Assignee: Alexander Wels
QA Contact: dalia
URL:
Whiteboard:
Depends On:
Blocks: 2203279
TreeView+ depends on / blocked
 
Reported: 2023-05-11 17:51 UTC by Alexander Wels
Modified: 2023-06-27 16:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2203279 (view as bug list)
Environment:
Last Closed: 2023-06-27 16:57:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer issues 2679 0 None closed Snapshot clone doesn't handle CSI drivers that have 0 in restoreSize of a snapshot properly 2023-05-11 17:51:01 UTC
Github kubevirt containerized-data-importer pull 2727 0 None open [release-v1.55] Handle 0 restore size better v155 2023-05-24 16:00:10 UTC
Red Hat Issue Tracker CNV-28790 0 None None None 2023-05-11 17:52:54 UTC

Description Alexander Wels 2023-05-11 17:51:01 UTC
Description of problem:
When doing a snapshot clone, the part of the code that creates a PVC with the snapshot source currently relies on the restoreSize of the VolumeSnapshot. If this value is 0 then creating the PVC fails (because we are attempting to create a 0 size PVC). For various reasons it might not be feasible to get a proper value in this field by the driver. See: democratic-csi/democratic-csi#129 We do know ahead of time what we want the size of the PVC to be, but due to some older broken CSI drivers we had to start at the restoreSize and then expand to the target size.

If we consider that behavior (target PVC size must equal restore size) a bug in the CSI driver, then we can create a PVC of the requested size regardless of the restoreSize in the snapshot.

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


How reproducible:
Use a CSI driver that has this issue (like the democratic-csi, or dell storage). 

Steps to Reproduce:
1. Try to create a snapshot clone
2. Clone will remain stuck in snapshot in progress.
3.

Actual results:
No clone happens

Expected results:
Clone happens normally even with storage where the restoreSize of the snapshot is 0.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.