Bug 1985125
| Summary: | OperatorGroup status is not updated when it has cardinality conflits when targetNamespace is used | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Bruno Andrade <bandrade> |
| Component: | OLM | Assignee: | Vu Dinh <vdinh> |
| OLM sub component: | OLM | QA Contact: | Bruno Andrade <bandrade> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | CC: | tflannag, vdinh |
| Version: | 4.9 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.9.0 | ||
| 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-10-18 17:40:51 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:15:06 UTC
*** 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 |