Bug 1928079 - [OCP 4.6.1X] Unable to delete operator
Summary: [OCP 4.6.1X] Unable to delete operator
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
medium
medium
Target Milestone: ---
: ---
Assignee: Kevin Rizza
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-12 10:51 UTC by Xavier Morano
Modified: 2024-03-25 18:10 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-12 17:16:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xavier Morano 2021-02-12 10:51:13 UTC
Description of problem:
after removing CSV, the operator disappears from the web console but not from ocp cli, even after deleting it

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

How reproducible:

Always

Steps to Reproduce:

1) install crossplane operator from web console
2) delete the operator
   1) Check the current version of the subscribed Operator (for example, crossplane) in the currentCSV file
       $ oc get subscription crossplane -n openshift-operators -o yaml | grep currentCSV
       currentCSV: crossplane.v0.11.0

   2) Delete the subscription (for example, crossplane):
      $ oc delete subscription crossplane -n openshift-operators
      subscription.operators.coreos.com "crossplane" deleted

   3) Delete the CSV for the Operator in the target namespace using the currentCSV value from the previous step:
      $ oc delete clusterserviceversion crossplane.v0.11.0 -n openshift-operators
      clusterserviceversion.operators.coreos.com "crossplane.v0.11.0" deleted

  Here, the operator disappear from web console

3) delete the operator
   1) $ oc delete operators crossplane.openshift-operators
      operator.operators.coreos.com "crossplane.openshift-operators" deleted

   but it's recreated

   $ oc get operators | grep crossplane
   crossplane.openshift-operators                        7s


Actual results:
the operator is re-created

Expected results:
The operator is deleted

Additional info:

Comment 1 Anik 2021-02-12 15:38:53 UTC
Looks like the operator pod is getting deleted (since deleting the CSV removes the CSV and it doesn't show up in the console again), but the metadata persists in the operator API. Needs to be reproduced to be confirmed.

Comment 2 Kevin Rizza 2021-02-12 17:16:18 UTC
This appears to be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1899588

I'm closing this as a duplicate.

Also, for your information in the future, the Operator API also tracks other related resources besides the CSV and Subscription -- the common resources that not all users are aware of are that you need to also delete the CRD for the Operator resource to be removed successfully once the bug I mentioned above is resolved.

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


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