Description of problem: The Operator API lists out components of an operator, but should not include copied CSVs in their component list. The worst form of this bug happens when the CSV is adopted (gets labelled) before being copied out to every namespace. It is also possible to trigger a form of this bug (even if the initial race hasn't happened) by adding a new namespace that falls into an existing operatorgroup's namespace set. Version-Release number of selected component (if applicable): Confirmed to be an issue in 4.7/4.8/master, assumed to be an issue in earlier releases. How reproducible: Steps to Reproduce: 1. Install an AllNAmespace operator 2. Add a namespace 3. View the Operator object corresponding to the installed operator. A "reason: Copied" CSV will be visible. (The worse form of this is racy, but seems to consistently happen on 4.7+ clusters) Actual results: Copied CSVs found in Operator.Status.Components Expected results: No copied CSVs found in Operator.Status.Components Additional info: This adds additional memory and cpu load to olm-operator proportional to the number of namespaces and number of operators in the cluster.
verify: zhaoxia@xzha-mac bug-1946838 % oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.8.0-0.nightly-2021-04-09-222447 True False 57m Cluster version is 4.8.0-0.nightly-2021-04-09-222447 1. Install an AllNAmespace operator zhaoxia@xzha-mac bug-1946838 % cat sub.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: klusterlet-operator namespace: openshift-operators spec: channel: stable installPlanApproval: Automatic name: klusterlet source: community-operators sourceNamespace: openshift-marketplace zhaoxia@xzha-mac bug-1946838 % oc apply -f sub.yaml subscription.operators.coreos.com/klusterlet-operator created 2. Add a namespace zhaoxia@xzha-mac bug-1946838 % oc new-project test-1 zhaoxia@xzha-mac bug-1946838 % oc project test-1 Now using project "test-1" on server "https://api.xzha0412-4.8.qe.devcluster.openshift.com:6443". zhaoxia@xzha-mac bug-1946838 % oc get csv NAME DISPLAY VERSION REPLACES PHASE klusterlet.v0.3.0 Klusterlet 0.3.0 klusterlet.v0.2.0 Succeeded 3. View the Operator object zhaoxia@xzha-mac bug-1946838 % oc get operator klusterlet.openshift-operators -o yaml | grep -i Copied zhaoxia@xzha-mac bug-1946838 % oc get operator klusterlet.openshift-operators -o yaml | grep -i reason reason: MinimumReplicasAvailable reason: NewReplicaSetAvailable reason: NoConflicts reason: InitialNamesAccepted reason: AllCatalogSourcesHealthy reason: InstallSucceeded LGTM, verified
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 (Moderate: OpenShift Container Platform 4.8.2 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-2021:2438