Bug 1866168 - Should forbidden to create the default OpeatorSource in 4.6
Summary: Should forbidden to create the default OpeatorSource in 4.6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Anik
QA Contact: Jian Zhang
URL:
Whiteboard:
: 1866169 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-05 04:00 UTC by Jian Zhang
Modified: 2020-10-27 16:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:24:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-marketplace pull 323 0 None closed Bug 1866168: [deprecation] Remove OperatorSource API 2020-11-25 03:29:19 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:25:07 UTC

Description Jian Zhang 2020-08-05 04:00:44 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
*** Bug 1866169 has been marked as a duplicate of this bug. ***

Comment 6 Jian Zhang 2020-08-14 01:50:54 UTC
Cluster version is 4.6.0-0.nightly-2020-08-13-091737
Marketplace operator version:
[root@preserve-olm-env data]# oc exec marketplace-operator-84f4c74d6d-xzl7c -- marketplace-operator --version
Marketplace source git commit: 5a249a2b9aa586fcdbd641b0247cc7eb9325135f
time="2020-08-14T01:37:41Z" level=info msg="Go Version: go1.14.4"
time="2020-08-14T01:37:41Z" level=info msg="Go OS/Arch: linux/amd64"
time="2020-08-14T01:37:41Z" level=info msg="operator-sdk Version: v0.8.0"

[root@preserve-olm-env data]# oc get operatorsource
error: the server doesn't have a resource type "operatorsource"

Now, the OperatorSource kind resource has been removed from 4.6. LGTM, verify it.

Comment 8 errata-xmlrpc 2020-10-27 16:24:53 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 GA Images), 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:4196


Note You need to log in before you can comment on or make changes to this bug.