Bug 1797019 - ClusterServiceVersion resource with Deleting status is never removed
Summary: ClusterServiceVersion resource with Deleting status is never removed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.3.z
Assignee: Evan Cordell
QA Contact: Salvatore Colangelo
URL:
Whiteboard:
Depends On: 1789920
Blocks: 1797021
TreeView+ depends on / blocked
 
Reported: 2020-01-31 18:31 UTC by Evan Cordell
Modified: 2020-03-24 14:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1789920
: 1797021 (view as bug list)
Environment:
Last Closed: 2020-03-24 14:32:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1272 None closed Bug 1797019: [release-4.3] Fix bad opgroup annotations 2020-03-25 10:52:45 UTC
Red Hat Product Errata RHBA-2020:0858 None None None 2020-03-24 14:33:02 UTC

Comment 6 Salvatore Colangelo 2020-03-12 17:54:40 UTC
Cluster Version:
[scolange@scolange ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.3.0-0.nightly-2020-03-12-085147   True        False         58m     Cluster version is 4.3.0-0.nightly-2020-03-12-085147

[scolange@scolange ~]$ oc exec catalog-operator-7db788c658-xc457 -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.13.0
git commit: 2e0301f1793337836dc95df5e5cdcee2f9ea2850

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
items:
- apiVersion: operators.coreos.com/v1
  kind: OperatorGroup
  metadata:
    annotations:
      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: {}
  status:
    lastUpdated: "2020-02-05T08:23:46Z"
    namespaces:
    - ""
kind: List
metadata:
  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
metadata:
  name: elasticsearch-operator
  namespace: openshift-operators-redhat
spec:
   channel: "4.3"
   installPlanApproval: Automatic
   name: elasticsearch-operator
   source: redhat-operators
   sourceNamespace: openshift-marketplace
   startingCSV: elasticsearch-operator.4.3.5-202003020549

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

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

[scolange@scolange BUG-1797019]$ oc get pods -n openshift-operators-redhat
NAME                                      READY   STATUS    RESTARTS   AGE
elasticsearch-operator-69b65c8f9c-tmjrt   1/1     Running   0          5m20s



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.3.5-202003020549 -n openshift-operators -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  annotations:
...
   olm.operatorGroup: openshift-operators-redhat
    olm.operatorNamespace: openshift-operators-redhat
    olm.skipRange: '>=4.1.0 <4.3.5-202003020549'
    support: AOS Cluster Logging, Jaeger
  creationTimestamp: "2020-03-12T17:16:15Z"
  generation: 1
  labels:
    olm.api.e43efcaa45c9f8d0: provided
    olm.copiedFrom: openshift-operators-redhat
  name: elasticsearch-operator.4.3.5-202003020549
  namespace: openshift-operators
  resourceVersion: "48307"

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

The name is different from csv copied it's correct  


Step 5 : Delete the elasticsearch-operator

[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.3.5-202003020549 -n openshift-operators-redhat
clusterserviceversion.operators.coreos.com "elasticsearch-operator.4.3.5-202003020549" deleted


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


All csv copied are deleted! LGMT

Comment 8 errata-xmlrpc 2020-03-24 14:32:35 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.

https://access.redhat.com/errata/RHBA-2020:0858


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