Bug 1797021 - ClusterServiceVersion resource with Deleting status is never removed
Summary: ClusterServiceVersion resource with Deleting status is never removed
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.2.z
Assignee: Evan Cordell
QA Contact: Salvatore Colangelo
Depends On: 1797019
TreeView+ depends on / blocked
Reported: 2020-01-31 18:33 UTC by Evan Cordell
Modified: 2020-04-07 17:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1797019
Last Closed: 2020-04-07 17:34:03 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1373 None closed [release-4.2] Bug 1797021: Fix bad opgroup annotations 2020-05-19 12:42:39 UTC
Red Hat Product Errata RHBA-2020:1263 None None None 2020-04-07 17:34:06 UTC

Comment 4 Salvatore Colangelo 2020-03-27 17:51:01 UTC
  below the steps

[scolange@scolange olm]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.2.0-0.nightly-2020-03-26-121826   True        False         4h7m    Cluster version is 4.2.0-0.nightly-2020-03-26-121826

[scolange@scolange olm]$ oc exec catalog-operator-f8d596b6c-hgmvl -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.11.0
git commit: 35a677d93fa2b2769f7cbb3fb88c3e9b4e8bd8cfll

Step 1 : Create namespace openshift-operators-redhat

oc create ns  openshift-operators-redhat

Step 2 :  create operatorGroup in that namespace

[scolange@scolange BUG-1797019]$ cat og.yaml 
apiVersion: v1
- apiVersion: operators.coreos.com/v1
  kind: OperatorGroup
      olm.providedAPIs: Elasticsearch.v1.logging.openshift.io
    creationTimestamp: "2020-02-05T08:23:46Z"
    generation: 1
    name: openshift-operators-redhat
    namespace: openshift-operators-redhat
    resourceVersion: "68155"
    selfLink: /apis/operators.coreos.com/v1/namespaces/openshift-operators-redhat/operatorgroups/openshift-operators-redhat
    uid: c3b55bb5-4545-4232-a8cb-afad8b1c8792
  spec: {}
    lastUpdated: "2020-02-05T08:23:46Z"
    - ""
kind: List
  resourceVersion: ""
  selfLink: ""

[scolange@scolange BUG-1797019]$ oc get operatorgroup -n openshift-operators-redhat
NAME                         AGE
openshift-operators-redhat   1m

Step 3: create subscription in that namespace

[scolange@scolange BUG-1797019]$ cat sub.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
  name: elasticsearch-operator
  namespace: openshift-operators-redhat
   channel: "4.3"
   installPlanApproval: Automatic
   name: elasticsearch-operator
   source: redhat-operators
   sourceNamespace: openshift-marketplace

[scolange@scolange BUG-1797019]$ oc get sub -n openshift-operators-redhat
NAME                     PACKAGE                  SOURCE             CHANNEL
elasticsearch-operator   elasticsearch-operator   redhat-operators   4.2

[scolange@scolange BUG-1797019]$ oc get csv -n openshift-operators-redhat
NAME                                         DISPLAY                  VERSION               REPLACES   PHASE
elasticsearch-operator.4.2.23-202003090920   Elasticsearch Operator   4.2.23-202003090920              Succeeded

[scolange@scolange BUG-1797019]$ oc get ip -n openshift-operators-redhat
NAME            CSV                                          APPROVAL    APPROVED
install-4z6sg   elasticsearch-operator.4.2.23-202003090920   Automatic   true

Step 4: Check the copied CSV in the openshift-operators namespace, and then check the annotation.olm.operatorGroup field

[scolange@scolange BUG-1797019]$ oc get csv elasticsearch-operator.4.2.23-202003090920 -n openshift-operators -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
    olm.operatorGroup: openshift-operators-redhat
    olm.operatorNamespace: openshift-operators-redhat
    olm.skipRange: '>=4.1.0 <4.2.23-202003090920'
    support: AOS Cluster Logging, Jaeger
  creationTimestamp: "2020-03-27T17:43:45Z"
  generation: 1
    olm.api.e43efcaa45c9f8d0: provided
    olm.copiedFrom: openshift-operators-redhat
  name: elasticsearch-operator.4.2.23-202003090920
  namespace: openshift-operators

[scolange@scolange BUG-1797019]$ oc get operatorgroup -n openshift-operators
NAME               AGE
global-operators   6h7m

The name is different from csv copied it's correct 

[scolange@scolange BUG-1797019]$ oc delete sub elasticsearch-operator -n openshift-operators-redhat
subscription.operators.coreos.com "elasticsearch-operator" deleted

[scolange@scolange BUG-1797019]$ oc delete csv elasticsearch-operator.4.2.23-202003090920 -n openshift-operators-redhat
clusterserviceversion.operators.coreos.com "elasticsearch-operator.4.2.23-202003090920" deleted

[scolange@scolange BUG-1797019]$ oc get csv -A
NAMESPACE                              NAME            DISPLAY          VERSION   REPLACES   PHASE
openshift-operator-lifecycle-manager   packageserver   Package Server   0.11.0               Succeeded

All csv copied are deleted! LGMT

Comment 6 errata-xmlrpc 2020-04-07 17:34:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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