Bug 1873250 - Default CatalogSource is not recreated once deleted
Summary: Default CatalogSource is not recreated once deleted
Keywords:
Status: VERIFIED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.6.0
Assignee: Anik
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-27 17:29 UTC by Anik
Modified: 2020-09-10 03:34 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github operator-framework operator-marketplace pull 336 None closed Bug 1873250: Recreate default CatalogSources if deleted/edited 2020-09-21 14:08:06 UTC

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.


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