Bug 1809320 - OLM dependency resolution works different between 4.2 and 4.3+
Summary: OLM dependency resolution works different between 4.2 and 4.3+
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.2.z
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Vu Dinh
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-02 20:29 UTC by Vu Dinh
Modified: 2020-07-13 17:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:17:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-registry pull 235 0 None closed Bug 1809320: fix(registry): change db load to get providedAPIs via bundle content 2020-06-23 08:56:33 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:17:57 UTC

Description Vu Dinh 2020-03-02 20:29:28 UTC
Description of problem:

OLM resolves dependencies differently for OCS in 4.2 and 4.3+.

Version-Release number of selected component (if applicable):
4.2/4.3

How reproducible:
100%

Steps to Reproduce:
1. Install OCS operator in 4.2 and 4.3 clusters.
2. Get CSV

Actual results:
For 4.2, OLM will installs OCS operator only as it installs 2 required CRDs (ObjectBucket and ObjectBucketClaim) as if OCS "owns" those 2 CRDs. For 4.3, OLM will installs OCS and lib-bucket operator (as dependency) given lib-bucket owns those two above CRDs.

Expected results:
OLM dependency resolution should be consistent between 4.2 and 4.3 so it needs to stick with one resolution, not both.

Additional info:
OCS 4.2.x operator contains ObjectBucket and ObjectBucketClaim CRD yaml inside its bundle (unintentionally) despite the fact they are listed as "required" in the CSV.

Comment 4 Jian Zhang 2020-04-30 04:10:23 UTC
Hi Vu,

Thanks very much for your suggestion!

Cluster version is 4.5.0-0.nightly-2020-04-29-231711
mac:~ jianzhang$ oc exec olm-operator-58d756bdd-4vd7s  -- olm --version
OLM version: 0.14.2
git commit: 15f5ba3e984f0f06abfbc6d9d3a38c3f659d2e60

1, Create a namespace and subscribe the OCS in it.
mac:~ jianzhang$ oc adm new-project openshift-storage
Created project openshift-storage

mac:~ jianzhang$ oc get sub 
NAME                                                                     PACKAGE                  SOURCE                CHANNEL
lib-bucket-provisioner-alpha-community-operators-openshift-marketplace   lib-bucket-provisioner   community-operators   alpha
ocs-operator                                                             ocs-operator             redhat-operators      stable-4.3

2, It requires the ObjectBucket and ObjectBucketClaims CRDs.
mac:~ jianzhang$ oc get csv ocs-operator.v4.3.0 -o=jsonpath='{.spec.customresourcedefinitions.required}' 
[map[description:Claim a bucket just like claiming a PV. Automate you app bucket provisioning by creating OBC with your app deployment. A secret and configmap (name=claim) will be created with access details for the app pods. displayName:Object Bucket Claim kind:ObjectBucketClaim name:objectbucketclaims.objectbucket.io resources:[map[kind:Service name:services version:v1] map[kind:Secret name:secrets version:v1] map[kind:ConfigMap name:configmaps version:v1] map[kind:StatefulSet name:statefulsets.apps version:v1]] version:v1alpha1] map[description:Used under-the-hood. Created per ObjectBucketClaim and keeps provisioning information. displayName:Object Bucket kind:ObjectBucket name:objectbuckets.objectbucket.io resources:[map[kind:Service name:services version:v1] map[kind:Secret name:secrets version:v1] map[kind:ConfigMap name:configmaps version:v1] map[kind:StatefulSet name:statefulsets.apps version:v1]] version:v1alpha1]]

3, Check the csv status.
mac:~ jianzhang$ oc get csv
NAME                                        DISPLAY                       VERSION              REPLACES   PHASE
lib-bucket-provisioner.v1.0.0               lib-bucket-provisioner        1.0.0                           Succeeded
ocs-operator.v4.3.0                         OpenShift Container Storage   4.3.0                           Succeeded
mac:~ jianzhang$ oc get pods
NAME                                     READY   STATUS    RESTARTS   AGE
lib-bucket-provisioner-9468547bd-jjskh   1/1     Running   0          2m19s
noobaa-operator-5847db64fb-mggvk         1/1     Running   0          2m16s
ocs-operator-8bfbd45d7-888vl             1/1     Running   0          2m16s
rook-ceph-operator-66644464c9-csfx8      1/1     Running   0          2m16s

The OCS installed successfully, LGTM, verify it.

Comment 7 errata-xmlrpc 2020-07-13 17:17: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.