Bug 1864121 - Operator installation failed - `Subscription` object stays in `UpgradePending` but the `InstallPlan` it associated with isn’t installing
Summary: Operator installation failed - `Subscription` object stays in `UpgradePending...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.5.z
Assignee: Nick Hale
QA Contact: yhui
URL:
Whiteboard:
Depends On: 1860185
Blocks: 1869717
TreeView+ depends on / blocked
 
Reported: 2020-08-03 18:10 UTC by Nick Hale
Modified: 2020-09-22 16:37 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1860185
: 1869717 (view as bug list)
Environment:
Last Closed: 2020-09-08 10:54:03 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1686 None closed [release-4.5] Bug 1864121: fix(install): account for installplans when calculating generation 2020-09-22 16:27:36 UTC
Red Hat Knowledge Base (Solution) 5319681 None None None 2020-08-19 08:26:34 UTC
Red Hat Product Errata RHBA-2020:3510 None None None 2020-09-08 10:54:35 UTC

Comment 5 Kevin Rizza 2020-08-21 18:55:26 UTC
Waiting on QE validation. Marking for upcoming sprint.

Comment 6 yhui 2020-08-23 13:57:47 UTC
Version:
[root@preserve-olm-env foo-operator]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-08-22-015330   True        False         71m     Cluster version is 4.5.0-0.nightly-2020-08-22-015330

[root@preserve-olm-env foo-operator]# oc exec olm-operator-55859956b-fcvj2 -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.15.1
git commit: 63b96f4ac47ec3b28855639b24ff980b2da4e436


Steps to test:
0. Login to OCP web Console and go to 'OperatorHub' page

1. Install Operator A in own NS mode to a NS 
   --> e.g. install Strimzi to NS “tw” (installPlan ‘install-mxvv9’ created)

2. Install Operator B in own NS mode to the same NS 
   --> e.g. install Portworx to NS “tw” (installPlan ‘install-plmll’ created)

[root@preserve-olm-env ~]# oc get sub
NAME                     PACKAGE                  SOURCE                CHANNEL
portworx-essentials      portworx-essentials      community-operators   stable
strimzi-kafka-operator   strimzi-kafka-operator   community-operators   stable
[root@preserve-olm-env foo-operator]# oc get ip
NAME            CSV                                APPROVAL    APPROVED
install-85pn8   strimzi-cluster-operator.v0.19.0   Automatic   true
install-88s99   portworx-essentials.v1.3.3         Automatic   true
[root@preserve-olm-env ~]# oc get csv
NAME                                           DISPLAY                  VERSION                 REPLACES   PHASE
portworx-essentials.v1.3.3                     Portworx Essentials      1.3.3                              Succeeded
strimzi-cluster-operator.v0.19.0               Strimzi                  0.19.0                             Succeeded

3. On the 'Installed Operators' page, uninstall Operator B using Console 
   (the Subscription of Operator B has been removed)

[root@preserve-olm-env foo-operator]# oc get sub
NAME                             PACKAGE                          SOURCE                CHANNEL
strimzi-kafka-operator           strimzi-kafka-operator           community-operators   stable

4. Go back to 'OperatorHub' page, install Operator C in own NS mode to the same NS 
   --> e.g. install Couchbase to NS “tw” 

[root@preserve-olm-env foo-operator]# oc get sub
NAME                             PACKAGE                          SOURCE                CHANNEL
couchbase-enterprise-certified   couchbase-enterprise-certified   certified-operators   stable
strimzi-kafka-operator           strimzi-kafka-operator           community-operators   stable
[root@preserve-olm-env foo-operator]# oc get ip
NAME            CSV                                APPROVAL    APPROVED
install-447q2   couchbase-operator.v2.0.2          Automatic   true
install-85pn8   strimzi-cluster-operator.v0.19.0   Automatic   true
install-88s99   portworx-essentials.v1.3.3         Automatic   true
[root@preserve-olm-env foo-operator]# oc get csv
NAME                               DISPLAY              VERSION   REPLACES   PHASE
couchbase-operator.v2.0.2          Couchbase Operator   2.0.2                Succeeded
strimzi-cluster-operator.v0.19.0   Strimzi              0.19.0               Succeeded
[root@preserve-olm-env foo-operator]# oc get pods
NAME                                               READY   STATUS    RESTARTS   AGE
couchbase-operator-7f686cb9f9-8cz27                1/1     Running   0          50s
strimzi-cluster-operator-v0.19.0-c5d98c58b-r9p9m   1/1     Running   0          3m50s

  The new sub  and a new ip are created successfully. And the csv and pod are created successfully.

5. Operator C’s Subscription object is succeeded.
[root@preserve-olm-env foo-operator]# oc get sub couchbase-enterprise-certified -o yaml
apiVersion: operators.coreos.com/v1alpha1
...
  conditions:
  - lastTransitionTime: "2020-08-23T13:47:32Z"
    message: all available catalogsources are healthy
    reason: AllCatalogSourcesHealthy
    status: "False"
    type: CatalogSourcesUnhealthy
  currentCSV: couchbase-operator.v2.0.2
  installPlanGeneration: 3
  installPlanRef:
    apiVersion: operators.coreos.com/v1alpha1
    kind: InstallPlan
    name: install-447q2
    namespace: tw
    resourceVersion: "43130"
    uid: e060b835-01e6-45e9-83d3-d5c88c47072f
  installedCSV: couchbase-operator.v2.0.2
  installplan:
    apiVersion: operators.coreos.com/v1alpha1
    kind: InstallPlan
    name: install-447q2
    uuid: e060b835-01e6-45e9-83d3-d5c88c47072f
  lastUpdated: "2020-08-23T13:47:37Z"
  state: AtLatestKnown

The bug is verified on 4.5.

Comment 8 errata-xmlrpc 2020-09-08 10:54: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 (OpenShift Container Platform 4.5.8 bug fix update), 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:3510


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