Bug 1923854 - Uninstalled operator keeps showing in the result of oc get operator command
Summary: Uninstalled operator keeps showing in the result of oc get operator command
Keywords:
Status: CLOSED DUPLICATE of bug 1899588
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-02 05:28 UTC by yhe
Modified: 2021-02-03 12:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-02 20:43:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yhe 2021-02-02 05:28:34 UTC
Description of problem:
After uninstalling an operator from the OperatorHub GUI, the corresponding subscription and csv are deleted.
However, the operator keeps showing in the result of the oc get operator command.

$ oc get subscription -A
No resources found

$ oc get csv -A
NAMESPACE                              NAME            DISPLAY          VERSION   REPLACES   PHASE
openshift-operator-lifecycle-manager   packageserver   Package Server   0.17.0               Succeeded

$ oc get operator
NAME                                                AGE
elasticsearch-operator.openshift-operators-redhat   127m

$ oc delete operator elasticsearch-operator.openshift-operators-redhat
operator.operators.coreos.com "elasticsearch-operator.openshift-operators-redhat" deleted

$ oc get operator
NAME                                                AGE
elasticsearch-operator.openshift-operators-redhat   2s

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


How reproducible:
Always

Steps to Reproduce:
1. Install an operator from the OperatorHub, e.g. Elasticsearch Operator
2. Uninstall the operator from the OperatorHub
3. Check the result of the oc get operator command

Actual results:
The uninstalled operator shows up

Expected results:
The uninstalled operator doesn't show up

Additional info:

Comment 1 Kevin Rizza 2021-02-02 20:43:17 UTC
Hello,

This is because using the uninstallation button on the OpenShift console does not completely remove any trace of the Operator installation. Specifically, it will not remove the CRDs or any CRs associated with the operator. If you `oc get elasticsearch-operator.openshift-operators-redhat -o yaml` there should be a place in the status block that describes the set of resources that the Operator object represents. In order to remove that object you will need to ensure all associated resources are removed in order to delete the Operator, and the console does not provide a function like that.

I'm closing this as NOTABUG. If you have further questions, feel free to reach out on the CoreOS slack channel #forum-operator-fw or on the olm dev mailing list aos-odin


Note You need to log in before you can comment on or make changes to this bug.