Bug 1727113

Summary: can't uninstall CNV
Product: Container Native Virtualization (CNV) Reporter: Irina Gulina <igulina>
Component: InstallationAssignee: Ryan Hallisey <rhallise>
Status: CLOSED CURRENTRELEASE QA Contact: Irina Gulina <igulina>
Severity: high Docs Contact:
Priority: high    
Version: 2.0CC: cnv-qe-bugs, ncredi, rhallise
Target Milestone: ---   
Target Release: 2.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v2.1.0-6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-04 15:08:52 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 logs
none
uninstall logs with sleep
none
logs for comment #6 none

Description Irina Gulina 2019-07-04 13:39:05 UTC
Created attachment 1587375 [details]
uninstall logs

Description of problem:
can't uninstall CNV

Version-Release number of selected component (if applicable):
bundle 36
# oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.4", GitCommit:"c9e4f28ff", GitTreeState:"clean", BuildDate:"2019-06-26T23:04:27Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+c62ce01", GitCommit:"c62ce01", GitTreeState:"clean", BuildDate:"2019-06-27T18:14:14Z", GoVersion:"go1.11.6", Compiler:"gc", Platform:"linux/amd64"}
# kubectl version
Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+c9e4f28ff", GitCommit:"c9e4f28ff", GitTreeState:"clean", BuildDate:"2019-06-26T23:04:27Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+c62ce01", GitCommit:"c62ce01", GitTreeState:"clean", BuildDate:"2019-06-27T18:14:14Z", GoVersion:"go1.11.6", Compiler:"gc", Platform:"linux/amd64"}


How reproducible:
tried twice on newly deployed clusters

Steps to Reproduce:
oc -n kubevirt-hyperconverged delete hco hyperconverged-cluster
oc -n kubevirt-hyperconverged delete sub hco-subscription
oc -n openshift-operator-lifecycle-manager delete catsrc hco-catalogsource
oc -n kubevirt-hyperconverged delete og hco-operatorgroup
sleep 60
oc -n kubevirt-hyperconverged delete pod --all
oc delete apiservices v1alpha3.subresources.kubevirt.io

Actual results:
see the attachment, also notice that deployments and replicaset are not removed. 
as well as crs, clusterroles, serviceAccounts and clusterrolebinding. Notice their Age, they are not removed when CNV is uninstalled.

Expected results:
all resources removed, clean ns

Comment 1 Irina Gulina 2019-07-04 16:52:50 UTC
*** Bug 1727112 has been marked as a duplicate of this bug. ***

Comment 2 Ryan Hallisey 2019-07-05 11:38:44 UTC
Running $ oc -n kubevirt-hyperconverged delete hco hyperconverged-cluster and $oc -n kubevirt-hyperconverged delete sub hco-subscription without a wait will cause resources to hang around.  Can you test this from the UI?

Comment 4 Irina Gulina 2019-07-08 09:43:00 UTC
Ryan, uninstall via WEB UI works fine. 
for CLI I have added sleep 120 to every delete command, it still doesn't work, see the new attachment, please. Also mind, that cleanup-hco script worked fine before and without any delays after hco and sub removing, Lev used it too: BZ 1712429#c2

Comment 5 Irina Gulina 2019-07-08 09:44:58 UTC
Created attachment 1588309 [details]
uninstall logs with sleep

Comment 6 Ryan Hallisey 2019-07-11 18:33:49 UTC
I'm getting a TLS error the cluster.  Sorry I didn't to this sooner.

Looking at the script Irina, the command: $ oc -n kubevirt-hyperconverged delete sub hco-subscription, should've cleaned up the operators, but it didn't.  After you run that command, you post the logs from $ oc logs $(oc get pods -n openshift-operator-lifecycle-manager | grep olm-operator- | awk '{print $1}') -n openshift-operator-lifecycle-manager

Comment 7 Irina Gulina 2019-07-12 12:54:17 UTC
Created attachment 1589909 [details]
logs for comment #6

Ryan, see logs attached please.

Comment 8 Irina Gulina 2019-09-24 15:27:43 UTC
Moving this one to Verified with a newly opened https://bugzilla.redhat.com/show_bug.cgi?id=1755009