Description of problem: OperatorGroup status should be updated when targetNamespace is used. Version-Release number of selected component (if applicable): 4.9.0-0.nightly-2021-07-21-081948 OLM version: 0.18.3 git commit: 1dc76f08ed05a635458420ffa979aebbe59a3890 How reproducible: Always Steps to Reproduce: 1. Create two namespaces test and test-1 2. Create an OperatorGroup with targetNamespaces for test and test-1, as below: apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: og-group namespace: test spec: targetNamespaces: - test - test-1 3. Create a second Operator in test-1 namespace with only test-1 as targetNamespaces. apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: og-group-1 namespace: test-1 spec: targetNamespaces: - test-1 Actual results: The status of the OperatorGroup does not have the conflict reported: oc get og og-group -o yaml -n test apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-07-22T23:01:21Z" generation: 1 name: og-group namespace: test resourceVersion: "582376" uid: 3e94a5ba-861d-4782-acdd-18e741b41602 spec: targetNamespaces: - test - test-1 status: lastUpdated: "2021-07-22T23:01:21Z" namespaces: - test - test-1 oc get og og-group-1 -o yaml -n test-1 apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-07-22T23:02:07Z" generation: 1 name: og-group-1 namespace: test-1 resourceVersion: "582731" uid: 552cb9c7-8004-4893-bd03-87a779632d9d spec: targetNamespaces: - test-1 status: lastUpdated: "2021-07-22T23:02:07Z" namespaces: - test-1 Expected results: It should have added MultipleOperatorGroupsFound error in both Additional info:
*** Bug 1985129 has been marked as a duplicate of this bug. ***
Still not fail when an OperatorGroup covers more than one targetNamespace. Moving back to assigned for developer review. oc exec catalog-operator-5b746cd5b7-bcbxj -n openshift-operator-lifecycle-manager -- olm --version OLM version: 0.18.3 git commit: 552292e080289112aa03776b6e1f3957e72d46b3 OCP: 4.9.0-0.nightly-2021-08-04-131508 oc get og og-group -o yaml -n test apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-08-04T23:45:11Z" generation: 1 name: og-group namespace: test resourceVersion: "41280" uid: df5b8d55-ef63-4c7c-b3c2-9f830508c605 spec: targetNamespaces: - test - test-1 status: lastUpdated: "2021-08-04T23:45:11Z" namespaces: - test - test-1 oc get og og-group-1 -o yaml -n test-1 apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-08-04T23:47:01Z" generation: 1 name: og-group-1 namespace: test-1 resourceVersion: "42137" uid: e722a981-2b8a-4f7a-9fab-65029e669522 spec: targetNamespaces: - test-1 status: lastUpdated: "2021-08-04T23:47:01Z" namespaces: - test-1
Hi Bruno, I tested on 4.9.0-0.ci-2021-08-05-033855 and it works fine. I just noticed you created 2 operatorgroups in 2 different namespaces (test and test-1). They need to be in the same namespace to see this error. Vu
Thanks, marking as VERIFIED. OLM version: 0.18.3 git commit: 552292e080289112aa03776b6e1f3957e72d46b3 OCP: 4.9.0-0.nightly-2021-08-04-131508 1) Create a namespace called test oc create ns test 2) Create one OperatorGroup cat og.yaml apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: og-group namespace: test spec: targetNamespaces: - test oc create -f og.yaml 3) Check OperatorGroup status oc get og og-group -o yaml -n test apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-07-22T21:36:59Z" generation: 1 name: og-group namespace: test resourceVersion: "543701" uid: 056435fc-345c-4db3-ab3c-d64bc4c4ffec spec: targetNamespaces: - test status: lastUpdated: "2021-07-22T21:36:59Z" namespaces: - test 4) Create a second OperatorGroup cat og1.yaml apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: og-group-1 namespace: test spec: targetNamespaces: - test oc create -f og1.yaml An error should be reported in status: oc get og og-group -o yaml -n test apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-07-22T21:36:59Z" generation: 1 name: og-group namespace: test resourceVersion: "543108" uid: 056435fc-345c-4db3-ab3c-d64bc4c4ffec spec: targetNamespaces: - test status: conditions: - lastTransitionTime: "2021-07-22T21:37:14Z" message: Multiple OperatorGroup found in the same namespace reason: MultipleOperatorGroupsFound status: "True" type: MultipleOperatorGroup lastUpdated: "2021-07-22T21:36:59Z" namespaces: - test oc get og og-group-1 -o yaml -n test apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: creationTimestamp: "2021-07-22T21:37:14Z" generation: 1 name: og-group-1 namespace: test resourceVersion: "543110" uid: e85860f8-e961-4695-898f-1bf6729f2f36 spec: targetNamespaces: - test status: conditions: - lastTransitionTime: "2021-07-22T21:37:14Z" message: Multiple OperatorGroup found in the same namespace reason: MultipleOperatorGroupsFound status: "True" type: MultipleOperatorGroup lastUpdated: "2021-07-22T21:37:14Z" namespaces: - test
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.9.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-2021:3759