Bug 1781366

Summary: Can't install operator unless dependency operator is installed first
Product: OpenShift Container Platform Reporter: Jason Montleon <jmontleo>
Component: OLMAssignee: lgallett
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bandrade, ecordell, jiazha, jkaur, jmatthew, lgallett, scolange, tbuskey, xjiang
Version: 4.3.0   
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1782837 (view as bug list) Environment:
Last Closed: 2020-05-04 11:19:30 UTC Type: Bug
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:    
Bug Blocks: 1782837    

Description Jason Montleon 2019-12-09 21:21:09 UTC
Description of problem:
On 4.2 I can install Cluster Application Migration Operator with a dependency on OCS Operator. When I do this OCS operator automatically starts installing.

On 4.3.nightly the Cluster Application Migration Operator gets stuck with a message, "one or more requirements couldn't be found".

If I then try to install OCS operator it won't install properly.

If I delete both subscriptions, install ocs-operator, then cam-operator both work as epxected.

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

How reproducible:
Seems always. Multiple clusters, multiple attempts.

Steps to Reproduce:
1. Set up a 4.3.nightly cluster
2. Attempt to install CAM

Actual results:
It does not complete installation properly

Expected results:
It should complete installation properly.

Additional info:

Comment 9 Jian Zhang 2020-03-09 13:32:18 UTC
Cluster version is 4.4.0-0.nightly-2020-03-09-081304
OLM version:
mac:~ jianzhang$ oc exec catalog-operator-76dc48f59f-66vsl -- olm --version
OLM version: 0.14.2
git commit: 8cb4ed8e09602e831c6f398bc3644752c6fb6474

1. Create a CatalogSource with a special image. About the the image building please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1782837#c4
mac:cam jianzhang$ cat cs.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
  name: cam-operator
  namespace: openshift-marketplace
  sourceType: grpc
  image: quay.io/aosqe4/cam-catalog:bug2-1782837
  displayName: Jian Operators
  publisher: jian

mac:~ jianzhang$ oc create -f cs.yaml 
catalogsource.operators.coreos.com/cam-operator created
mac:~ jianzhang$ oc get catalogsource
NAME                  DISPLAY               TYPE   PUBLISHER   AGE
cam-operator          Jian Operators        grpc   jian        8s
certified-operators   Certified Operators   grpc   Red Hat     43m
community-operators   Community Operators   grpc   Red Hat     43m
redhat-marketplace    Red Hat Marketplace   grpc   Red Hat     43m
redhat-operators      Red Hat Operators     grpc   Red Hat     43m

mac:~ jianzhang$ oc get pods
NAME                                    READY   STATUS    RESTARTS   AGE
cam-operator-sfst2                      1/1     Running   0          41s

2, Check the OCS and CAM operators.
mac:~ jianzhang$ oc get packagemanifest |grep mig
mig-operator                                 Jian Operators        81s
mac:~ jianzhang$ oc get packagemanifest |grep ocs
ocs-operator                                 Jian Operators        105s

3, Subscribe to this CAM operator in the default project.

4, Check if the dependent OCS can be installed automatically.
mac:~ jianzhang$ oc get sub -n default
NAME                                                                     PACKAGE                  SOURCE                CHANNEL
lib-bucket-provisioner-alpha-community-operators-openshift-marketplace   lib-bucket-provisioner   community-operators   alpha
mig-operator                                                             mig-operator             cam-operator          release-v1
ocs-operator-alpha-cam-operator-openshift-marketplace                    ocs-operator             cam-operator          alpha
mac:~ jianzhang$ oc get csv -n default
NAME                            DISPLAY                       VERSION   REPLACES   PHASE
lib-bucket-provisioner.v1.0.0   lib-bucket-provisioner        1.0.0                Succeeded
mig-operator.v1.0.1             Migration Operator            1.0.1                Succeeded
ocs-operator.v4.3.0             OpenShift Container Storage   4.3.0                Succeeded

mac:~ jianzhang$ oc get pods -n default
NAME                                     READY   STATUS    RESTARTS   AGE
lib-bucket-provisioner-fccc6df7c-njlb9   1/1     Running   0          70s
migration-operator-598df85479-84dr2      2/2     Running   0          81s
noobaa-operator-585d6dc44d-bk7p5         1/1     Running   0          62s
ocs-operator-5b96695d6d-29kw5            1/1     Running   0          62s
rook-ceph-operator-7659dc4b57-rt756      1/1     Running   0          62s

It works! This dependent OCS operator can be installed automatically. Verify it.

Comment 11 errata-xmlrpc 2020-05-04 11:19:30 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.