Bug 1873250

Summary: Default CatalogSource is not recreated once deleted
Product: OpenShift Container Platform Reporter: Anik <anbhatta>
Component: OLMAssignee: Anik <anbhatta>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high    
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.0   
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-10-27 16:35:33 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 Anik 2020-08-27 17:29:55 UTC
Description of problem:

When a default CatalogSource is deleted, it is not re-created, which was the case when a default OperatorSource was deleted up until 4.5

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


How reproducible:
Always

Steps to Reproduce:
1. Launch a OCP 4.6 cluster
2. Delete a default catalogSource: oc delete catsrc community-operators -n openshift-marketplace 

Actual results:

Default CatalogSource is not re-created

Expected results:

Default CatalogSource is re-created 

Additional info:

Comment 3 Jian Zhang 2020-09-10 03:34:05 UTC
The marketplace-operator version:
mac:openshift-tests-private jianzhang$ oc exec marketplace-operator-b79479b6b-c4wrt -- marketplace-operator --version
time="2020-09-10T03:22:19Z" level=info msg="Go Version: go1.14.4"
time="2020-09-10T03:22:19Z" level=info msg="Go OS/Arch: linux/amd64"
time="2020-09-10T03:22:19Z" level=info msg="operator-sdk Version: v0.8.0"
Marketplace source git commit: ffdf6ffc8c6e95e1823aa243cdea60d4612be47b

1, Delete the default CatalogSource CR, it was recoverd.
mac:openshift-tests-private jianzhang$ oc delete catalogsource community-operators 
catalogsource.operators.coreos.com "community-operators" deleted
mac:openshift-tests-private jianzhang$ oc get catalogsource
NAME                  DISPLAY                TYPE   PUBLISHER      AGE
certified-operators   Certified Operators    grpc   Red Hat        23h
community-operators   Community Operators    grpc   Red Hat        2m45s
qe-app-registry       Production Operators   grpc   OpenShift QE   23h
redhat-marketplace    Red Hat Marketplace    grpc   Red Hat        23h
redhat-operators      Red Hat Operators      grpc   Red Hat        23h

mac:openshift-tests-private jianzhang$ oc delete catalogsource --all
catalogsource.operators.coreos.com "certified-operators" deleted
catalogsource.operators.coreos.com "community-operators" deleted
catalogsource.operators.coreos.com "redhat-marketplace" deleted
catalogsource.operators.coreos.com "redhat-operators" deleted

mac:openshift-tests-private jianzhang$ oc get catalogsource
NAME                  DISPLAY               TYPE   PUBLISHER   AGE
certified-operators   Certified Operators   grpc   Red Hat     2m53s
community-operators   Community Operators   grpc   Red Hat     2m52s
redhat-marketplace    Red Hat Marketplace   grpc   Red Hat     2m52s
redhat-operators      Red Hat Operators     grpc   Red Hat     2m51s
mac:openshift-tests-private jianzhang$ oc get pods
NAME                                   READY   STATUS    RESTARTS   AGE
certified-operators-g9wtq              1/1     Running   0          2m59s
community-operators-l9mxm              1/1     Running   0          2m58s
marketplace-operator-b79479b6b-c4wrt   1/1     Running   0          23h
redhat-marketplace-hpvvs               1/1     Running   0          2m57s
redhat-operators-qm6cz                 1/1     Running   0          2m57s


2, Delete a non-default CatalogSource CR, it wasn't recoverd.
mac:openshift-tests-private jianzhang$ oc delete catalogsource qe-app-registry
catalogsource.operators.coreos.com "qe-app-registry" deleted
mac:openshift-tests-private jianzhang$ oc get catalogsource
NAME                  DISPLAY               TYPE   PUBLISHER   AGE
certified-operators   Certified Operators   grpc   Red Hat     23h
community-operators   Community Operators   grpc   Red Hat     5m25s
redhat-marketplace    Red Hat Marketplace   grpc   Red Hat     23h
redhat-operators      Red Hat Operators     grpc   Red Hat     23h

LGTM, verify it.

Comment 5 errata-xmlrpc 2020-10-27 16:35:33 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