Bug 1915905

Summary: When the marketplace-operator pod get's restarted, the custom catalogsources are gone, as well as the pods
Product: OpenShift Container Platform Reporter: Ben Luddy <bluddy>
Component: OLMAssignee: Ben Luddy <bluddy>
OLM sub component: OLM QA Contact: Salvatore Colangelo <scolange>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: urgent CC: andbartl, bluddy, jiazha, krizza, nhale
Version: 4.6Keywords: Triaged, UpcomingSprint
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: 1908431 Environment:
Last Closed: 2021-02-01 15:24:36 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: 1908431    
Bug Blocks:    

Comment 3 Salvatore Colangelo 2021-01-25 20:46:29 UTC
[scolange@scolange ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2021-01-25-060359   True        False         161m    Cluster version is 4.6.0-0.nightly-2021-01-25-060359

[scolange@scolange BUG-1732914]$ oc -n openshift-operator-lifecycle-manager exec catalog-operator-6d578c7468-xzbfd -- olm --version
OLM version: 0.16.1
git commit: 09f6590a10e4925e7382e1a389c002d761e341fb


1. Created ConfigMap

[scolange@scolange BUG-1732914]$ oc create -f 1.configmap_no_ns_etcd-v5.yaml -n openshift-marketplace
configmap/installed-community-global-operators created

2. Created CatalogSource

[scolange@scolange BUG-1732914]$ oc create -f 2.catalogsource.yaml -n openshift-marketplace
catalogsource.operators.coreos.com/installed-community-global-operators-test created

3. Wait the catalog source go READY

[scolange@scolange BUG-1732914]$ oc get catalogsource installed-community-global-operators-test -o yaml -n openshift-marketplace
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  creationTimestamp: "2021-01-25T20:32:49Z"
  generation: 1
  managedFields:
  - apiVersion: operators.coreos.com/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        .: {}
        f:configMap: {}
        f:displayName: {}
        f:icon:
          .: {}
          f:base64data: {}
          f:mediatype: {}
        f:publisher: {}
        f:sourceType: {}
    manager: oc
    operation: Update
    time: "2021-01-25T20:32:49Z"
  - apiVersion: operators.coreos.com/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        .: {}
        f:configMapReference:
          .: {}
          f:lastUpdateTime: {}
          f:name: {}
          f:namespace: {}
          f:resourceVersion: {}
          f:uid: {}
        f:connectionState:
          .: {}
          f:address: {}
          f:lastConnect: {}
          f:lastObservedState: {}
        f:registryService:
          .: {}
          f:createdAt: {}
          f:port: {}
          f:protocol: {}
          f:serviceName: {}
          f:serviceNamespace: {}
    manager: catalog
    operation: Update
    time: "2021-01-25T20:33:33Z"
  name: installed-community-global-operators-test
  namespace: openshift-marketplace
  resourceVersion: "131639"
  selfLink: /apis/operators.coreos.com/v1alpha1/namespaces/openshift-marketplace/catalogsources/installed-community-global-operators-test
  uid: 0d4c2fc9-c9eb-4ccf-8e55-14e7fef73934
spec:
  configMap: installed-community-global-operators
  displayName: Community Operators Test
  icon:
    base64data: ""
    mediatype: ""
  publisher: Community
  sourceType: internal
status:
  configMapReference:
    lastUpdateTime: "2021-01-25T20:32:49Z"
    name: installed-community-global-operators
    namespace: openshift-marketplace
    resourceVersion: "131105"
    uid: 72d4e691-827e-4105-8e35-bdbc50b1ea39
  connectionState:
    address: installed-community-global-operators-test.openshift-marketplace.svc:50051
    lastConnect: "2021-01-25T20:33:32Z"
    lastObservedState: READY
  registryService:
    createdAt: "2021-01-25T20:32:51Z"
    port: "50051"
    protocol: grpc
    serviceName: installed-community-global-operators-test
    serviceNamespace: openshift-marketplace

5. Verify the properties of OperatorHub

[scolange@scolange BUG-1732914]$ oc edit operatorhubs.config.openshift.io cluster
operatorhub.config.openshift.io/cluster edited


[scolange@scolange BUG-1732914]$ oc get operatorhubs.config.openshift.io cluster -o jsonpath="{.spec}" 
map[disableAllDefaultSources:true]


6.Verify all pod in openshift-marketplace

[scolange@scolange BUG-1732914]$ oc get pod -n openshift-marketplace
NAME                                              READY   STATUS    RESTARTS   AGE
installed-community-global-operators-test-5z8dw   1/1     Running   0          6m41s
marketplace-operator-6cf4d48cd4-9dttm             1/1     Running   0          166m
qe-app-registry-xlg27                             1/1     Running   0          166m


7. Delete the main pod of marketplace


[scolange@scolange BUG-1732914]$ oc delete pod marketplace-operator-6cf4d48cd4-9dttm -n openshift-marketplace
pod "marketplace-operator-6cf4d48cd4-9dttm" deleted

8. Verify if it is cancelled and became running again

[scolange@scolange BUG-1732914]$ oc get pod -n openshift-marketplace
NAME                                              READY   STATUS    RESTARTS   AGE
installed-community-global-operators-test-5z8dw   1/1     Running   0          8m35s
marketplace-operator-6cf4d48cd4-g9vmd             1/1     Running   0          42s
qe-app-registry-xlg27                             1/1     Running   0          168m


8. Verify if the custom catalogSource


[scolange@scolange BUG-1732914]$ oc get catalogsources.operators.coreos.com -n openshift-marketplace
NAME                                        DISPLAY                    TYPE       PUBLISHER      AGE
installed-community-global-operators-test   Community Operators Test   internal   Community      9m58s
qe-app-registry                             Production Operators       grpc       OpenShift QE   172m


LGMT

Comment 5 errata-xmlrpc 2021-02-01 15:24:36 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.15 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:0235