Bug 1763749

Summary: OLM dependency resolution does not prefer the initial catalog
Product: OpenShift Container Platform Reporter: Alexander Greene <agreene>
Component: OLMAssignee: Alexander Greene <agreene>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: afield, agreene, dmesser, ecordell, jiazha, jmatthew, nstielau, timoran
Version: 4.2.0   
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1762769 Environment:
Last Closed: 2019-11-13 18:56:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1762769    
Bug Blocks:    

Description Alexander Greene 2019-10-21 14:06:51 UTC
+++ This bug was initially created as a clone of Bug #1762769 +++

Description of problem:

When installing Operator A that express dependencies it is expected that in the case where multiple candidate Operators exist that could fulfil the dependency there is a preference to the catalog where Operator A is installed from.

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

OCP 4.2

How reproducible:

Randomly, but with high probability

Steps to Reproduce:
1. Install OpenShift Service Mesh Operator
2. Observe dependent Operators Jaeger & Kiali getting installed as a dependency
3. Observe the OpenShift Service Mesh getting installed

Actual results:

Jaeger is installed in the community version from the community catalog

Expected results:

Jaeger is installed in the supported version, from the redhat-operators catalog which is the same Operator that OpenShift Service Mesh was installed from.

Additional info:

This issue is already raised upstream as well: https://github.com/operator-framework/operator-lifecycle-manager/issues/1076

--- Additional comment from Daniel Messer on 2019-10-17 12:48:15 UTC ---

--- Additional comment from Alexander Greene on 2019-10-17 13:34:04 UTC ---

Updating targetRelease to 4.3

Comment 2 Jian Zhang 2019-11-05 06:54:38 UTC
Change status to MODIFIED since no available payload with the fixed PR.

Comment 4 Jian Zhang 2019-11-06 09:29:35 UTC
Verify it, details in below´╝Ü

Cluster version is 4.2.0-0.nightly-2019-11-06-011942
mac:~ jianzhang$ oc exec catalog-operator-98986fcd9-mwmg4 -- olm --version
OLM version: 0.11.0
git commit: b0c1709812781134b64df9463ae1fd999dca7a48

1, Install the ServiceMesh from the community, the dependent operators from the community too, lgtm. 
mac:~ jianzhang$ oc get sub -n openshift-operators
NAME                                                      PACKAGE           SOURCE                CHANNEL
jaeger-stable-community-operators-openshift-marketplace   jaeger            community-operators   stable
kiali-stable-community-operators-openshift-marketplace    kiali             community-operators   stable
maistraoperator                                           maistraoperator   community-operators   1.0

mac:~ jianzhang$ oc get csv -n openshift-operators
NAME                      DISPLAY                          VERSION   REPLACES                  PHASE
jaeger-operator.v1.14.0   Community Jaeger Operator        1.14.0    jaeger-operator.v1.13.1   Succeeded
kiali-operator.v1.7.0     Kiali Operator                   1.7.0     kiali-operator.v1.6.1     Succeeded
maistraoperator.v1.0.0    Red Hat OpenShift Service Mesh   1.0.0                               Succeeded
2, Uninstall this ServiceMesh operator.

3, Install the ServiceMesh operator from the redhat-operators. The dependent operators from the redhat-operators too, lgtm.

mac:~ jianzhang$ oc get sub -n openshift-operators
NAME                                                           PACKAGE               SOURCE             CHANNEL
jaeger-product-stable-redhat-operators-openshift-marketplace   jaeger-product        redhat-operators   stable
kiali-ossm-stable-redhat-operators-openshift-marketplace       kiali-ossm            redhat-operators   stable
servicemeshoperator                                            servicemeshoperator   redhat-operators   1.0
mac:~ jianzhang$ oc get csv  -n openshift-operators
NAME                         DISPLAY                          VERSION   REPLACES                     PHASE
jaeger-operator.v1.13.1      Jaeger Operator                  1.13.1                                 Succeeded
kiali-operator.v1.0.6        Kiali Operator                   1.0.6     kiali-operator.v1.0.5        Succeeded
servicemeshoperator.v1.0.1   Red Hat OpenShift Service Mesh   1.0.1     servicemeshoperator.v1.0.0   Succeeded

Comment 6 errata-xmlrpc 2019-11-13 18:56:07 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.