Bug 2203279

Summary: [4.13] Snapshot clone doesn't handle CSI drivers that have 0 in restoreSize of a snapshot properly
Product: Container Native Virtualization (CNV) Reporter: Alexander Wels <awels>
Component: StorageAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: dalia <dafrank>
Severity: high Docs Contact:
Priority: high    
Version: 4.13.0CC: alitke, ngavrilo, yadu
Target Milestone: ---   
Target Release: 4.13.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.13.1.rhel9-79 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2203278 Environment:
Last Closed: 2023-06-20 13:41:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2203278    
Bug Blocks:    

Description Alexander Wels 2023-05-11 17:52:40 UTC
+++ This bug was initially created as a clone of Bug #2203278 +++

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:

Comment 6 errata-xmlrpc 2023-06-20 13:41:05 UTC
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 (OpenShift Virtualization 4.13.1 Images), 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/RHEA-2023:3686