Bug 2128243

Summary: PVC is not cleaned up when Pending DataVolume is deleted during failed VM creation
Product: Container Native Virtualization (CNV) Reporter: Juan Orti <jortialc>
Component: StorageAssignee: Adam Litke <alitke>
Status: CLOSED DUPLICATE QA Contact: Natalie Gavrielov <ngavrilo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.10.1CC: cnv-qe-bugs, yadu
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:13:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Orti 2022-09-20 10:59:04 UTC
Description of problem:
When VM creation fails during the cloning procedure, deletion of the VM would delete the DataVolume, but the cdi-tmp-* PVC that was created during the procedure remains.

Version-Release number of selected component (if applicable):
OpenShift 4.10.16
OpenShift Virtualization 4.10.1

How reproducible:
Always

Steps to Reproduce:
1. The source disk is in a PVC in the openshift-virtualization-os-images namespace and uses a Ceph storage class.
2. The creation of the VM in a different namespace fails during the cloning procedure.
3. After the failure, the DataVolume is deleted.

Actual results:
In the source namespace openshift-virtualization-os-images there's a leftover cdi-tmp-* PVC that it's stuck in "Pending" state.

Expected results:
The cdi-tmp-* PVC is removed too.

Additional info:
This looks like the same issue reported in these links, which in theory was fixed in 4.8.1:

https://bugzilla.redhat.com/show_bug.cgi?id=1994504
https://github.com/kubevirt/containerized-data-importer/issues/2323

Comment 2 Yan Du 2022-09-21 12:13:09 UTC

*** This bug has been marked as a duplicate of bug 2102180 ***