Bug 1815762 - Fails to install from bundle images
Summary: Fails to install from bundle images
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On: 1815761
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-21 13:38 UTC by Evan Cordell
Modified: 2020-05-13 22:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1815761
Environment:
Last Closed: 2020-05-13 22:01:14 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1403 None closed [release-4.4] Bug 1815762: Fix installplan error when installing from bundles 2020-04-29 11:18:33 UTC
Red Hat Product Errata RHBA-2020:0581 None None None 2020-05-13 22:01:15 UTC

Description Evan Cordell 2020-03-21 13:38:18 UTC
+++ This bug was initially created as a clone of Bug #1815761 +++

Description of problem:

Bundle images were not surfacing the CSV name to the installplan, so those bundles were missing from the clusterServiceVersionNames field. That is used when applying an installplan to decide whether to emit errors like "pre-existing CRD owners found for owned CRD(s) of dependent CSV."


How reproducible: Always


Steps to Reproduce:
1. Create a bundle image
2. Create an index image referencing the bundle image
3. Create a CatalogSource that references the index image
4. Create a subscription to the catalog that will install the bundle image

Actual results:

InstallPlan has an error: "pre-existing CRD owners found for owned CRD(s) of dependent CSV."

Expected results: 

Bundle installs


Additional info:

https://github.com/operator-framework/operator-lifecycle-manager/issues/1347

Comment 3 Jian Zhang 2020-04-02 03:36:00 UTC
mac:~ jianzhang$ oc adm release info registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-04-01-213929 --commits |grep lifecycle
  operator-lifecycle-manager                     https://github.com/operator-framework/operator-lifecycle-manager            3f7675c6867e4d43c99eb8138cfb5fc686a37b3b

mac:~ jianzhang$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-04-01-213929   True        False         63m     Cluster version is 4.4.0-0.nightly-2020-04-01-213929

1, Create a CatalogSource that reference index image: quay.io/olmqe/app-operator-index:0.0.4
mac:~ jianzhang$ oc create -f cs-index.yaml 
catalogsource.operators.coreos.com/index-test created
mac:~ jianzhang$ cat cs-index.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: index-test
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/olmqe/app-operator-index:0.0.4
  displayName: Bug Operators
  publisher: jian

mac:~ jianzhang$ oc get catalogsource -A
NAMESPACE               NAME                  DISPLAY               TYPE   PUBLISHER   AGE
openshift-marketplace   certified-operators   Certified Operators   grpc   Red Hat     79m
openshift-marketplace   community-operators   Community Operators   grpc   Red Hat     79m
openshift-marketplace   index-test            Bug Operators         grpc   jian        61s
openshift-marketplace   redhat-marketplace    Red Hat Marketplace   grpc   Red Hat     79m
openshift-marketplace   redhat-operators      Red Hat Operators     grpc   Red Hat     79m
mac:~ jianzhang$ oc get pods -n openshift-marketplace
NAME                                    READY   STATUS    RESTARTS   AGE
certified-operators-549565d9d4-gtptb    1/1     Running   0          79m
community-operators-75f67fbdf9-vwjg7    1/1     Running   0          79m
index-test-jz78s                        1/1     Running   0          85s
marketplace-operator-56fb579c67-qqwn6   1/1     Running   0          80m
redhat-marketplace-ff975c7f6-6zwd9      1/1     Running   0          79m
redhat-operators-5d4fbd797c-xllpv       1/1     Running   0          79m
mac:~ jianzhang$ 
mac:~ jianzhang$ oc get packagemanifest |grep -i bug
app-operator                                 Bug Operators         119s

2, Subscribe this operator, it works well.
mac:~ jianzhang$ oc get sub -A
NAMESPACE             NAME           PACKAGE        SOURCE       CHANNEL
openshift-operators   app-operator   app-operator   index-test   alpha
mac:~ jianzhang$ oc get csv -n openshift-operators 
NAME                  DISPLAY        VERSION   REPLACES   PHASE
app-operator.v0.0.4   App Operator   0.0.4                Succeeded
mac:~ jianzhang$ oc get pods -n openshift-operators 
NAME                            READY   STATUS    RESTARTS   AGE
app-operator-7c6556f844-zlvg9   1/1     Running   0          32s

3, Update this index image to quay.io/olmqe/app-operator-index:0.0.5

mac:~ jianzhang$ oc edit catalogsource index-test -n openshift-marketplace
catalogsource.operators.coreos.com/index-test edited
mac:~ jianzhang$  oc get pods -n openshift-marketplace
NAME                                                              READY   STATUS      RESTARTS   AGE
518d01601d3759fb57704daa271263bf5f136a471ed53edb75519eb4a24hlnj   0/1     Completed   0          27s
certified-operators-549565d9d4-gtptb                              1/1     Running     0          85m
community-operators-75f67fbdf9-vwjg7                              1/1     Running     0          85m
daf4cac1a217f4c3ed36204a7cfec3cbdd4f7a259a048cf45a4e372a42tcl5k   0/1     Completed   0          2m51s
index-test-xblcw                                                  1/1     Running     0          50s
marketplace-operator-56fb579c67-qqwn6                             1/1     Running     0          85m
redhat-marketplace-ff975c7f6-6zwd9                                1/1     Running     0          85m
redhat-operators-5d4fbd797c-xllpv                                 1/1     Running     0          85m
mac:~ jianzhang$ oc get sub -n openshift-operators
NAME           PACKAGE        SOURCE       CHANNEL
app-operator   app-operator   index-test   alpha
mac:~ jianzhang$ oc get csv -n openshift-operators
NAME                  DISPLAY        VERSION   REPLACES              PHASE
app-operator.v0.0.5   App Operator   0.0.5     app-operator.v0.0.4   Succeeded
mac:~ jianzhang$ oc get pods -n openshift-operators
NAME                            READY   STATUS    RESTARTS   AGE
app-operator-7c6556f844-zlvg9   1/1     Running   0          3m19s

The installed operator can be upgraded successfully. LGTM, verify it.

Comment 5 errata-xmlrpc 2020-05-13 22:01:14 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:0581


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