Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1740174

Summary: The generated InstallPlan object didn't refer to itself subscription object
Product: OpenShift Container Platform Reporter: Evan Cordell <ecordell>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bandrade, chezhang, chuo, dyan, jfan, jiazha, jpeeler, scolange, zitang
Version: 4.1.zKeywords: Regression
Target Milestone: ---   
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1714140 Environment:
Last Closed: 2019-08-28 19:54:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1714140    
Bug Blocks:    

Comment 1 Jeff Peeler 2019-08-14 18:48:15 UTC
*** Bug 1740491 has been marked as a duplicate of this bug. ***

Comment 3 Jian Zhang 2019-08-23 08:45:49 UTC
Cluster version is 4.1.0-0.nightly-2019-08-22-165647
OLM version:
io.openshift.build.commit.url=https://github.com/operator-framework/operator-lifecycle-manager/commit/83de7554e707e549d2b3c8ab90cc9c4a58e76b5b

1. Install the Couchbase, anchore-engine and TiDB operators, select the "All Namespaces ..." option.
mac:~ jianzhang$ oc get ip
NAME            CSV                              SOURCE   APPROVAL    APPROVED
install-46wdm   anchore-engine-operator.v0.0.2            Automatic   true
install-j5rql   couchbase-operator.v1.1.0                 Automatic   true
mac:~ jianzhang$ oc get sub
NAME                             PACKAGE                          SOURCE                                    CHANNEL
anchore-engine                   anchore-engine                   installed-certified-openshift-operators   alpha
couchbase-enterprise-certified   couchbase-enterprise-certified   installed-certified-openshift-operators   preview
tidb-operator-certified          tidb-operator-certified          installed-certified-openshift-operators   beta
mac:~ jianzhang$ oc get csv
NAME                             DISPLAY                   VERSION       REPLACES   PHASE
anchore-engine-operator.v0.0.2   Anchore Engine Operator   0.0.2                    Succeeded
couchbase-operator.v1.1.0        Couchbase Operator        1.1.0                    Succeeded
tidb-operator.1.0.0-beta1        TiDB Operator             1.0.0-beta1              Succeeded
mac:~ jianzhang$ oc get pods
NAME                                       READY   STATUS    RESTARTS   AGE
anchore-engine-operator-77db6d68-pqwnk     1/1     Running   0          23m
couchbase-operator-8b9c5c469-627rk         1/1     Running   0          36m
tidb-controller-manager-5d858fccd6-jh848   1/1     Running   0          23m

mac:~ jianzhang$ oc get ip install-46wdm -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: InstallPlan
metadata:
  creationTimestamp: "2019-08-23T07:59:58Z"
  generateName: install-
  generation: 1
  name: install-46wdm
  namespace: openshift-operators
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: Subscription
    name: couchbase-enterprise-certified
    uid: 2f553da1-c57a-11e9-b51e-02d7dad0d6d4
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: Subscription
    name: anchore-engine
    uid: 0208f442-c57b-11e9-849f-065f4295b472
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: Subscription
    name: tidb-operator-certified
    uid: 69107a82-c57b-11e9-b51e-02d7dad0d6d4
  resourceVersion: "121906"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-operators/installplans/install-46wdm
  uid: 00907542-c57c-11e9-863e-0aa7dcc92aea
spec:
  approval: Automatic
  approved: true
  clusterServiceVersionNames:
  - anchore-engine-operator.v0.0.2
  - tidb-operator.1.0.0-beta1
  source: ""


2. Remove the Couchbase and anchore-engine operators.
mac:~ jianzhang$ oc get sub
NAME                      PACKAGE                   SOURCE                                    CHANNEL
tidb-operator-certified   tidb-operator-certified   installed-certified-openshift-operators   beta
mac:~ jianzhang$ oc get ip
NAME            CSV                              SOURCE   APPROVAL    APPROVED
install-46wdm   anchore-engine-operator.v0.0.2            Automatic   true
mac:~ jianzhang$ oc get csv
NAME                        DISPLAY         VERSION       REPLACES   PHASE
tidb-operator.1.0.0-beta1   TiDB Operator   1.0.0-beta1              Succeeded
mac:~ jianzhang$ oc get ip install-46wdm -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: InstallPlan
metadata:
  creationTimestamp: "2019-08-23T07:59:58Z"
  generateName: install-
  generation: 1
  name: install-46wdm
  namespace: openshift-operators
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: Subscription
    name: tidb-operator-certified
    uid: 69107a82-c57b-11e9-b51e-02d7dad0d6d4
  resourceVersion: "139305"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-operators/installplans/install-46wdm
  uid: 00907542-c57c-11e9-863e-0aa7dcc92aea
spec:
  approval: Automatic
  approved: true
  clusterServiceVersionNames:
  - anchore-engine-operator.v0.0.2
  - tidb-operator.1.0.0-beta1
...

3. Install the anchore-engine operator again, select the "All Namespaces ..." option.
mac:~ jianzhang$ oc get pods
NAME                                       READY   STATUS    RESTARTS   AGE
anchore-engine-operator-77db6d68-mw4tv     1/1     Running   0          110s
tidb-controller-manager-5d858fccd6-jh848   1/1     Running   0          32m
mac:~ jianzhang$ oc get ip
NAME            CSV                              SOURCE   APPROVAL    APPROVED
install-46wdm   anchore-engine-operator.v0.0.2            Automatic   true
install-hfxtd   anchore-engine-operator.v0.0.2            Automatic   true
mac:~ jianzhang$ oc get ip install-hfxtd -o yaml
apiVersion: operators.coreos.com/v1alpha1
kind: InstallPlan
metadata:
  creationTimestamp: "2019-08-23T08:31:05Z"
  generateName: install-
  generation: 1
  name: install-hfxtd
  namespace: openshift-operators
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: Subscription
    name: tidb-operator-certified
    uid: 69107a82-c57b-11e9-b51e-02d7dad0d6d4
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: Subscription
    name: anchore-engine
    uid: 5927eb70-c580-11e9-849f-065f4295b472
  resourceVersion: "141513"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-operators/installplans/install-hfxtd
  uid: 5931730d-c580-11e9-863e-0aa7dcc92aea
spec:
  approval: Automatic
  approved: true
  clusterServiceVersionNames:
  - anchore-engine-operator.v0.0.2


Now, the Anchore operator works well, and the TiDB only refers to itself subscription, others have been deleted. LGTM.

Comment 5 errata-xmlrpc 2019-08-28 19:54:50 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-2019:2547