Bug 1874065

Summary: [ovirt-csi-driver] volumes are not delete when cluster is destroyed
Product: OpenShift Container Platform Reporter: Fabio Bertinatto <fbertina>
Component: StorageAssignee: OCP on RHV Team <ocprhvteam>
Storage sub component: oVirt CSI Driver QA Contact: Michael Burman <mburman>
Status: CLOSED DEFERRED Docs Contact:
Severity: low    
Priority: low CC: aos-bugs, bzlotnik, chuffman, dmoessne, hpopal, jpasztor, jsafrane, mburman, michal.skrivanek, rgolan
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
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: 2022-07-14 11:45:44 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 Fabio Bertinatto 2020-08-31 13:27:35 UTC
oVirt "destroy cluster" doesn't delete volumes created by oVirt CSI driver.

In AWS EBS we "tag" volumes with the cluster ID so that the installer knows which volumes to delete. Check if we can use similar approach in oVirt.

Comment 1 Jan Safranek 2020-09-17 15:57:53 UTC
If it is not possible to recognize volumes provisioned by the cluster on oVirt (e.g. by tags or labels), then 'openshift-install destroy cluster' should at least print a warning that volumes/snapshots are not deleted and admins should delete them manually. Please check with oVirt - maybe they have something else than tags and reassign to installer if it's really not possible to list the volumes.

Comment 2 Fabio Bertinatto 2020-09-18 13:22:17 UTC
@Benny and @Roy: could you help answering these questions, please?

1. Could you confirm that non-attached volumes created by oVirt CSI driver are NOT deleted when the cluster is destroyed?
2. If the answer is yes, could you confirm that it's NOT possible to add tags to volumes created by the driver?
3. If tagging volumes is not supported, is there any mechanism in oVirt that we could use to delete those volumes on cluster deletion?

Like Jan posted above, if there's no way we can identify and delete those volumes on cluster deletion, we'll assign this bug to the installer team so that we emit a warning at least.

Comment 3 Roy Golan 2020-11-05 06:44:47 UTC
(In reply to Fabio Bertinatto from comment #2)
> @Benny and @Roy: could you help answering these questions, please?
> 
> 1. Could you confirm that non-attached volumes created by oVirt CSI driver
> are NOT deleted when the cluster is destroyed?
yes, confirmed

> 2. If the answer is yes, could you confirm that it's NOT possible to add
> tags to volumes created by the driver?

quite sure its not supported.
Michal any news about labels and/or tag support in RHV?

> 3. If tagging volumes is not supported, is there any mechanism in oVirt that
> we could use to delete those volumes on cluster deletion?
> 

Need to think if can come up with something accurate and deterministic, like some
constant naming scheme will use for disks to group them (disk.name = $clusterID/volumeID ?)

> Like Jan posted above, if there's no way we can identify and delete those
> volumes on cluster deletion, we'll assign this bug to the installer team so
> that we emit a warning at least.

Maybe leave this bug for exploring a solution and open one for the installer to 
create the WARN and remove the WARN if/when there will a way to destroy those.

Comment 4 Michal Skrivanek 2020-11-05 08:32:38 UTC
(In reply to Roy Golan from comment #3)
> > 2. If the answer is yes, could you confirm that it's NOT possible to add
> > tags to volumes created by the driver?
> 
> quite sure its not supported.
> Michal any news about labels and/or tag support in RHV?

nope.

are those disks attached to any VM or are they all floating?

> > 3. If tagging volumes is not supported, is there any mechanism in oVirt that
> > we could use to delete those volumes on cluster deletion?
> Need to think if can come up with something accurate and deterministic, like
> some
> constant naming scheme will use for disks to group them (disk.name =
> $clusterID/volumeID ?)

Name or Description fields sound feasible

Comment 5 Roy Golan 2020-11-06 14:49:02 UTC
(In reply to Michal Skrivanek from comment #4)
> (In reply to Roy Golan from comment #3)
> > > 2. If the answer is yes, could you confirm that it's NOT possible to add
> > > tags to volumes created by the driver?
> > 
> > quite sure its not supported.
> > Michal any news about labels and/or tag support in RHV?
> 
> nope.
> 
> are those disks attached to any VM or are they all floating?
> 

might be both cases I think, for example when you forcefully teardown a cluster that has running workloads.

> > > 3. If tagging volumes is not supported, is there any mechanism in oVirt that
> > > we could use to delete those volumes on cluster deletion?
> > Need to think if can come up with something accurate and deterministic, like
> > some
> > constant naming scheme will use for disks to group them (disk.name =
> > $clusterID/volumeID ?)
> 
> Name or Description fields sound feasible

Comment 7 Gal Zaidman 2021-03-31 08:18:21 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 8 Janos Bonic 2021-07-01 11:29:48 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 11 Michal Skrivanek 2022-07-14 11:45:44 UTC
didn't get to it for 2 years, we don't plan any major changes in oVirt CSI driver functionality, closing