Bug 2011897

Summary: Poor user experience trying to uninstall Openshift Virtualization 4.9 from the UI with running VMs
Product: Container Native Virtualization (CNV) Reporter: Simone Tiraboschi <stirabos>
Component: InstallationAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9.0CC: cnv-qe-bugs, stirabos
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: 2021-10-08 10:38:50 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:
Attachments:
Description Flags
Uninstall dialog
none
errors none

Description Simone Tiraboschi 2021-10-07 16:28:56 UTC
Created attachment 1830437 [details]
Uninstall dialog

Description of problem:
On OCP 4.9 UI there is a new optional flag (see the attached uninstall dialog) to delete operands as a side effect of uninstalling the operator.

If the user tries to do that with existing VMs,
our validating webhooks refuses to the delete request for CDI, Kubevirt and then HCO CRs.
But the UI ignores the errors and continue deleting other operator CRs, the CSV and the subscription simply reporting the errors at the end to the user suggesting to manually remove the remaining CRs that cannot be removed because the operator supposed to remove the finalizers are not there anymore (see errors screenshot).


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

How reproducible:
100%

Steps to Reproduce:
1. Deploy CNV
2. Create a VM
3. Unistall CNV from the UI choosing also "delete all operands instances for this operator".

Actual results:
The product got only partially removed with hard to delete leftovers

Expected results:
The product is correctly removed

Additional info:

Comment 2 Simone Tiraboschi 2021-10-07 16:46:01 UTC
see:
https://github.com/operator-framework/enhancements/blob/master/enhancements/olm-deletes-operands.md#operand-cleanup-api

for a mechanism to avoid getting the CSV (and so the operands) deleted until the CRs are there.

Although what we really want is probably a mechanism where OLM tries to delete the operators CRs in dry-run mode first.

Comment 3 Simone Tiraboschi 2021-10-07 20:52:07 UTC
Looking at https://github.com/openshift/console/pull/9142
I think that the deletion of operands is completely implemented in the UI regardless of
  cleanup:
    enabled: false

Comment 4 Simone Tiraboschi 2021-10-08 10:38:50 UTC
Closing as a dup of https://bugzilla.redhat.com/show_bug.cgi?id=2012120
Currently we cannot do that much for this on CNV side.

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