Description of problem: After disabling default catalogSources through operatorHub cluster resource, the status of the operatorHub resource states that the default catalogSources cannot be found, which is expected after deleting the default catalogSoures: ``` apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: name: cluster spec: disableAllDefaultSources: true status: sources: - disabled: true message: CatalogSource.operators.coreos.com "redhat-operators" not found name: redhat-operators status: Error - disabled: true message: CatalogSource.operators.coreos.com "certified-operators" not found name: certified-operators status: Error - disabled: true message: CatalogSource.operators.coreos.com "community-operators" not found name: community-operators status: Error - disabled: true message: CatalogSource.operators.coreos.com "redhat-marketplace" not found name: redhat-marketplace status: Error ``` A bunch of logs are generated as well: ``` time="2022-04-27T20:48:01Z" level=info msg="Reconciling OperatorHub cluster" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource certified-operators - CatalogSource.operators.coreos.com \"certified-operators\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource community-operators - CatalogSource.operators.coreos.com \"community-operators\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource redhat-marketplace - CatalogSource.operators.coreos.com \"redhat-marketplace\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource redhat-operators - CatalogSource.operators.coreos.com \"redhat-operators\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource redhat-marketplace - CatalogSource.operators.coreos.com \"redhat-marketplace\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource community-operators - CatalogSource.operators.coreos.com \"community-operators\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource redhat-operators - CatalogSource.operators.coreos.com \"redhat-operators\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource certified-operators - CatalogSource.operators.coreos.com \"certified-operators\" not found" time="2022-04-27T20:48:01Z" level=error msg="[defaults] Error processing CatalogSource redhat-marketplace - CatalogSource.operators.coreos.com \"redhat-marketplace\" not found" ``` Version-Release number of selected component (if applicable): 4.11 How reproducible: Always Steps to Reproduce: 1. Disable the default catalogSource by setting the cluster operatorHub resource's `spec.disableAllDefaultCatalogSources` field to true. 2. Inspect the status ofthe cluster operatorHub resource. Actual results: Not Found error are present in the status of the oepratorHub resource: ``` apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: name: cluster spec: disableAllDefaultSources: true status: sources: - disabled: true message: CatalogSource.operators.coreos.com "redhat-operators" not found name: redhat-operators status: Error - disabled: true message: CatalogSource.operators.coreos.com "certified-operators" not found name: certified-operators status: Error - disabled: true message: CatalogSource.operators.coreos.com "community-operators" not found name: community-operators status: Error - disabled: true message: CatalogSource.operators.coreos.com "redhat-marketplace" not found name: redhat-marketplace status: Error ``` Expected results: A message conveying that the default catalogSources were disabled successfully: ``` apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: name: cluster spec: disableAllDefaultSources: true status: sources: - disabled: true name: redhat-operators status: Success - disabled: true name: certified-operators status: Success - disabled: true name: community-operators status: Success - disabled: true name: redhat-marketplace status: Success ``` Additional info:
1, Build a cluster with the fixed PR via the cluster-bot mac:operator-marketplace jianzhang$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.11.0-0.ci.test-2022-04-28-055639-ci-ln-t6n94b2-latest True False 11m Cluster version is 4.11.0-0.ci.test-2022-04-28-055639-ci-ln-t6n94b2-latest mac:operator-marketplace jianzhang$ oc project openshift-marketplace Now using project "openshift-marketplace" on server "https://api.ci-ln-t6n94b2-72292.origin-ci-int-gce.dev.rhcloud.com:6443". mac:operator-marketplace jianzhang$ oc get catalogsource NAME DISPLAY TYPE PUBLISHER AGE certified-operators Certified Operators grpc Red Hat 28m community-operators Community Operators grpc Red Hat 28m redhat-marketplace Red Hat Marketplace grpc Red Hat 28m redhat-operators Red Hat Operators grpc Red Hat 28m 2, Disable the OperatorHub. mac:operator-marketplace jianzhang$ oc patch operatorhub cluster -p '{"spec": {"disableAllDefaultSources": true}}' --type=merge operatorhub.config.openshift.io/cluster patched mac:operator-marketplace jianzhang$ oc get catalogsource No resources found in openshift-marketplace namespace. 3, Check the OperatorHub status. The status is success, no error message sent. Looks good. mac:operator-marketplace jianzhang$ oc get operatorhub cluster -o yaml apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: annotations: capability.openshift.io/name: marketplace include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" release.openshift.io/create-only: "true" creationTimestamp: "2022-04-28T06:03:48Z" generation: 2 name: cluster ownerReferences: - apiVersion: config.openshift.io/v1 kind: ClusterVersion name: version uid: 09491974-0f3a-4014-b1d1-0c5a86de6366 resourceVersion: "33235" uid: ed28d246-6492-49be-b895-68ed0f91341d spec: disableAllDefaultSources: true status: sources: - disabled: true name: redhat-marketplace status: Success - disabled: true name: redhat-operators status: Success - disabled: true name: certified-operators status: Success - disabled: true name: community-operators status: Success 4, Check the marketplace-operator logs. No error message found. mac:operator-marketplace jianzhang$ oc get pods NAME READY STATUS RESTARTS AGE marketplace-operator-6d8c66f596-v2b77 1/1 Running 0 34m mac:operator-marketplace jianzhang$ oc logs marketplace-operator-6d8c66f596-v2b77 > marketplace mac:operator-marketplace jianzhang$ cat marketplace | grep "Error processing CatalogSource" mac:operator-marketplace jianzhang$ 5, Enable the OperatorHub, the status is success and the disable is false. mac:operator-marketplace jianzhang$ oc patch operatorhub cluster -p '{"spec": {"disableAllDefaultSources": false}}' --type=merge operatorhub.config.openshift.io/cluster patched mac:operator-marketplace jianzhang$ oc get operatorhub cluster -o yaml apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: annotations: capability.openshift.io/name: marketplace include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" release.openshift.io/create-only: "true" creationTimestamp: "2022-04-28T06:03:48Z" generation: 3 name: cluster ownerReferences: - apiVersion: config.openshift.io/v1 kind: ClusterVersion name: version uid: 09491974-0f3a-4014-b1d1-0c5a86de6366 resourceVersion: "35343" uid: ed28d246-6492-49be-b895-68ed0f91341d spec: disableAllDefaultSources: false status: sources: - disabled: false name: redhat-operators status: Success - disabled: false name: certified-operators status: Success - disabled: false name: community-operators status: Success - disabled: false name: redhat-marketplace status: Success LGTM, verify it.
Hey Eric, thanks for that. Does it look good now?
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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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/RHSA-2022:5069