Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1985129

Summary: OperatorGroup status is not updated when it has cardinality conflits when selector is used
Product: OpenShift Container Platform Reporter: Bruno Andrade <bandrade>
Component: OLMAssignee: Vu Dinh <vdinh>
OLM sub component: OLM QA Contact: Bruno Andrade <bandrade>
Status: CLOSED DUPLICATE Docs Contact:
Severity: low    
Priority: low CC: krizza
Version: 4.9   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-30 01:11:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Andrade 2021-07-22 23:42:31 UTC
Description of problem:

OperatorGroup status should be updated when selector 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 a label for the two namespaces
oc label ns test1 env="test"
oc label ns test-1 env="test"


3. 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:
    selector:
      matchLabels:
       env: "test"

4. 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:33:16Z"
  generation: 1
  name: og-group
  namespace: test
  resourceVersion: "597257"
  uid: 0c4b3045-0502-4ebc-bf25-67edf019b9a4
status:
  lastUpdated: "2021-07-22T23:33:16Z"
  namespaces:
  - ""


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:

Comment 1 Vu Dinh 2021-07-30 01:11:39 UTC
This issue is pretty much a duplicate of #1985125 so will close this one as a dup.

*** This bug has been marked as a duplicate of bug 1985125 ***