Bug 1968226

Summary: Operator dependency not consistently chosen from default channel
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: OLMAssignee: Ben Luddy <bluddy>
OLM sub component: OLM QA Contact: Bruno Andrade <bandrade>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bandrade, tflannag
Version: 4.6Keywords: Triaged
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-22 08:29:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1945702    
Bug Blocks:    

Comment 2 Bruno Andrade 2021-06-14 07:05:22 UTC
verify it on 4.6

oc get clusterversion version  -o=jsonpath='{.status.history..version}'                                                                             
4.6.0-0.nightly-2021-06-11-193006%   
OLM version: 0.16.1
git commit: cf3f9b212526733cdb2678c947d7a75bbab6c03

cat res.yaml 
apiVersion: v1
kind: Namespace
metadata:
  name: test-ns
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: ibm-operator-catalog
  namespace: test-ns
spec:
  image: quay.io/kuiwang/olm-index:v1945261-a
  sourceType: grpc
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: opencloud-operators
  namespace: test-ns
spec:
  image: quay.io/kuiwang/olm-index:v1945261
  sourceType: grpc
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: test-operators
  namespace: test-ns
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: test-subscription
  namespace: test-ns
spec:
  name: ibm-automation-core
  channel: v1.0
  source: ibm-operator-catalog
  sourceNamespace: test-ns

kubectl apply -f res.yaml 
namespace/test-ns created
catalogsource.operators.coreos.com/ibm-operator-catalog created
catalogsource.operators.coreos.com/opencloud-operators created
operatorgroup.operators.coreos.com/test-operators created
subscription.operators.coreos.com/test-subscription created

kubectl get sub -n test-ns
NAME                                                         PACKAGE                       SOURCE                 CHANNEL
ibm-common-service-operator-v3-opencloud-operators-test-ns   ibm-common-service-operator   opencloud-operators    v3
test-subscription                                            ibm-automation-core           ibm-operator-catalog   v1.0


kubectl delete namespace test-ns
namespace "test-ns" deleted

kubectl get sub -n test-ns      
NAME                                                         PACKAGE                       SOURCE                 CHANNEL
ibm-common-service-operator-v3-opencloud-operators-test-ns   ibm-common-service-operator   opencloud-operators    v3
test-subscription                                            ibm-automation-core           ibm-operator-catalog   v1.0


kubectl delete namespace test-ns
namespace "test-ns" deleted

Comment 5 errata-xmlrpc 2021-06-22 08:29:48 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 (OpenShift Container Platform 4.6.35 bug fix update), 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-2021:2410