Bug 1815761 - 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
high
medium
Target Milestone: ---
: 4.5.0
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On: 1816535
Blocks: 1815762
TreeView+ depends on / blocked
 
Reported: 2020-03-21 13:36 UTC by Evan Cordell
Modified: 2020-07-13 17:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1815762 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:23:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1401 0 None closed Bug 1815761: Fix installplan error when installing from bundles 2020-06-23 09:32:04 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:23:51 UTC

Description Evan Cordell 2020-03-21 13:36:35 UTC
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-03-26 11:19:14 UTC
Cluster version is 4.5.0-0.nightly-2020-03-26-010450
OLM version:
mac:~ jianzhang$ oc exec catalog-operator-9b74f4874-dpp8p -- olm --version
OLM version: 0.14.2
git commit: 915c118f5845e72265ecd9b2cf59a1a26819fb92

1, Create a CatalogSource that reference index image: quay.io/huizenga/app-operator-index:0.0.4
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/huizenga/app-operator-index:0.0.4
  displayName: Bug Operators
  publisher: jian

mac:~ jianzhang$ oc create -f cs-index.yaml 
catalogsource.operators.coreos.com/index-test created
mac:~ jianzhang$ oc get catalogsource -A
NAMESPACE               NAME                  DISPLAY               TYPE   PUBLISHER   AGE
openshift-marketplace   certified-operators   Certified Operators   grpc   Red Hat     5h
openshift-marketplace   community-operators   Community Operators   grpc   Red Hat     5h
openshift-marketplace   index-test            Bug Operators         grpc   jian        19s
openshift-marketplace   redhat-marketplace    Red Hat Marketplace   grpc   Red Hat     5h
openshift-marketplace   redhat-operators      Red Hat Operators     grpc   Red Hat     5h
mac:~ jianzhang$ oc get pods -n openshift-marketplace
NAME                                   READY   STATUS    RESTARTS   AGE
certified-operators-8d7646748-mhrtc    1/1     Running   0          4h
community-operators-869cfff749-tpbdd   1/1     Running   0          5h1m
index-test-mwc8v                       1/1     Running   0          33s
marketplace-operator-559cd5cc8-kgxgv   1/1     Running   0          5h1m
redhat-marketplace-7cf89b7575-jvzlw    1/1     Running   0          5h1m
redhat-operators-8486875c9f-fzn8n      1/1     Running   0          5h1m
mac:~ jianzhang$ oc get packagemanifest |grep -i bug
app-operator                                 Bug Operators         60s

2, Subscribe this operator, it works well.
mac:~ jianzhang$ oc get sub -n default
NAME           PACKAGE        SOURCE       CHANNEL
app-operator   app-operator   index-test   alpha
mac:~ jianzhang$ oc get csv -n default
NAME                  DISPLAY        VERSION   REPLACES   PHASE
app-operator.v0.0.4   App Operator   0.0.4                Succeeded


3, Update this index image to quay.io/huizenga/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
518d01601d3759fb57704daa271263bf5f136a471ed53edb75519eb4a258vwm   0/1     Completed   0          2m57s
certified-operators-8d7646748-mhrtc                               1/1     Running     0          4h6m
community-operators-869cfff749-tpbdd                              1/1     Running     0          5h7m
daf4cac1a217f4c3ed36204a7cfec3cbdd4f7a259a048cf45a4e372a42bvq2l   0/1     Completed   0          5m16s
index-test-d8drg                                                  1/1     Running     0          3m14s
marketplace-operator-559cd5cc8-kgxgv                              1/1     Running     0          5h7m
redhat-marketplace-7cf89b7575-jvzlw                               1/1     Running     0          5h7m
redhat-operators-8486875c9f-fzn8n                                 1/1     Running     0          5h7m


mac:~ jianzhang$ oc get sub -n default
NAME           PACKAGE        SOURCE       CHANNEL
app-operator   app-operator   index-test   alpha
mac:~ jianzhang$ oc get csv -n default
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 ip -n default
NAME            CSV                   APPROVAL    APPROVED
install-7dkd9   app-operator.v0.0.4   Automatic   true
install-tbg4p   app-operator.v0.0.5   Automatic   true
mac:~ jianzhang$ oc get ip -n default install-7dkd9  -o=jsonpath='{.spec.clusterServiceVersionNames}'
[app-operator.v0.0.4]mac:~ jianzhang$ 
mac:~ jianzhang$ oc get ip -n default install-tbg4p  -o=jsonpath='{.spec.clusterServiceVersionNames}'
[app-operator.v0.0.5]
mac:~ jianzhang$ oc get pods -n default
NAME                           READY   STATUS    RESTARTS   AGE
app-operator-fcb9895d5-rsxmk   1/1     Running   0          4m57s


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

Comment 5 errata-xmlrpc 2020-07-13 17:23:29 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:2409


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