Bug 1866169

Summary: Should forbidden to create the default OpeatorSource in 4.6
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED DUPLICATE Docs Contact:
Severity: medium    
Priority: unspecified CC: krizza
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
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: 2020-08-05 13:42:54 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:
Embargoed:

Description Jian Zhang 2020-08-05 04:00:58 UTC
Description of problem:
In OCP 4.6, as default, we use the CatalogSource instead of the OperatorSource.
After disable an default CatalogSource object, and create the same name OperatorSource object, its pods fall in the the creating-Terminating endless loop.

Version-Release number of selected component (if applicable):
Cluster version is 4.6.0-0.nightly-2020-08-04-035157
[root@preserve-olm-env data]# oc exec catalog-operator-746bcb45b5-bptgn -- olm --version
OLM version: 0.16.0
git commit: 83e1f768792f1b2d5f3b34c9d945c73394c873f6

How reproducible:
always

Steps to Reproduce:
1, Disable the community CatalogSource.
[root@preserve-olm-env data]# cat operatorhub.yaml
apiVersion: config.openshift.io/v1
kind: OperatorHub
metadata:
  name: cluster
spec:
  disableAllDefaultSources: false
  sources: [
    {
      name: "community-operators",
      disabled: true,
    }
  ]
[root@preserve-olm-env data]# oc apply -f operatorhub.yaml 
Warning: oc apply should be used on resource created by either oc create --save-config or oc apply
operatorhub.config.openshift.io/cluster configured

2, Create an OperatorSource for the community operators.
[root@preserve-olm-env data]# cat operatorsource-community.yaml
apiVersion: operators.coreos.com/v1
kind: OperatorSource
metadata:
  name: community-operators
  namespace: openshift-marketplace
spec:
  authorizationToken: {}
  displayName: Community QE Operators
  endpoint: https://quay.io/cnr
  publisher: QE
  registryNamespace: community-operators
  type: appregistry
[root@preserve-olm-env data]# oc create -f operatorsource-community.yaml
operatorsource.operators.coreos.com/community-operators created

3. Check its pods.

Actual results:
The communit operators' pods fall in the creating-Terminating endless loop. 

[root@preserve-olm-env data]# oc get pods
NAME                                    READY   STATUS        RESTARTS   AGE
certified-operators-8qcmg               1/1     Running       0          14h
certified-operators-lrd85               1/1     Running       0          16m
community-operators-5f86684c7b-dpv7p    0/1     Terminating   0          4s
community-operators-6896b7f88d-97xvp    0/1     Pending       0          1s
community-operators-68bc549459-5kqph    0/1     Pending       0          0s
community-operators-6b7df9b8f9-pkg9c    0/1     Terminating   0          2s
community-operators-6d457ff7cb-dhfkx    0/1     Terminating   0          2s
community-operators-7b76d9cfdb-55nwk    0/1     Terminating   0          5s
community-operators-cb4dff97f-dm9xf     0/1     Terminating   0          5s


Expected results:
Since the community-operators CatalogSource object has been disabled, it shouldn't generate the CatalogSource from the OperatorSource. Or we should forbidden to create the default OpeatorSource(redhat-operators, redhat-marketplace, certified-operators, community-operators) in 4.6. 

Additional info:

Comment 1 Kevin Rizza 2020-08-05 13:42:54 UTC

*** This bug has been marked as a duplicate of bug 1866168 ***