Bug 2175972

Summary: The PVC is not deleted along with the bootable volumes or dataSources
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Aviv Turgeman <aturgema>
Status: CLOSED MIGRATED QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.13.0CC: gouyang, rsdeor, tnisan
Target Milestone: ---   
Target Release: 4.14.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-22 11:12:19 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 Guohua Ouyang 2023-03-07 01:47:56 UTC
Description of problem:
The PVC is not deleted along by deleting bootable volumes or dataSources. It can cause below problems:
1. the storage system is filled up by the left PVCs
2. it breaks the add volume flow if user fill a name which is occupied by a PVC

Possible solution:
Add a checkbox to the delete modal of DataSource to delete the PVC


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


How reproducible:


Steps to Reproduce:
1. add a volume in Bootable volumes page
2. delete the volume in Bootable volumes page
3. the backend PVC is not deleted
4. delete the datasource in DataSources page
5. the backend PVC is not deleted
6. add a volume again with the same name
7. an error happens because the PVC is existing


Actual results:


Expected results:


Additional info:

Comment 1 Aviv Turgeman 2023-03-08 11:43:27 UTC
Hi Guohua

when deleting the DS in cli, does it also deletes the source PVC?
when looking into the source PVCs for the common DS, I didn't see in PVC YAML file the ownerReference object which should delete the PVC on DS delete

Comment 2 Guohua Ouyang 2023-03-10 03:42:58 UTC
(In reply to Aviv Turgeman from comment #1)
> Hi Guohua
> 
> when deleting the DS in cli, does it also deletes the source PVC?

Deleting the DS in cli also not delete the PVC.

> when looking into the source PVCs for the common DS, I didn't see in PVC
> YAML file the ownerReference object which should delete the PVC on DS delete

Comment 3 Aviv Turgeman 2023-03-12 09:50:20 UTC
That's what I thought, I'm not sure if this is an actual bug TBH
can you please redirect this bug to the proper team to let them check if this behavior is correct?

Comment 4 Guohua Ouyang 2023-03-22 00:37:58 UTC
(In reply to Aviv Turgeman from comment #3)
> That's what I thought, I'm not sure if this is an actual bug TBH
> can you please redirect this bug to the proper team to let them check if
> this behavior is correct?

What I suggest is add a checkbox to delete the PVCs in the delete modal, just like the VM delete modal.
But we don't have the final decision yet, leave the bug here until we get the updates.