Bug 1899588
Summary: | Operator objects are re-created after all other associated resources have been deleted | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Joe Lanford <jlanford> | |
Component: | OLM | Assignee: | Joe Lanford <jlanford> | |
OLM sub component: | OperatorHub | QA Contact: | kuiwang | |
Status: | CLOSED ERRATA | Docs Contact: | ||
Severity: | medium | |||
Priority: | medium | CC: | agreene, jiazha, krizza, kuiwang, marcusnoto95, nhale, vdinh, xmorano, yhe | |
Version: | 4.7 | |||
Target Milestone: | --- | |||
Target Release: | 4.7.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1929335 (view as bug list) | Environment: | ||
Last Closed: | 2021-02-24 15:34:22 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1929335 |
Description
Joe Lanford
2020-11-19 15:54:11 UTC
Looks like this one won't make it in for the 4.7 release, the work is still under review for now. Moving it out and marking for upcoming sprint. *** Bug 1923854 has been marked as a duplicate of this bug. *** *** Bug 1928079 has been marked as a duplicate of this bug. *** Hi! any workaround available for OCP 4.6.1X ? thx To workaround this issue, run the following: ``` kubectl scale deployment -n openshift-operator-lifecycle-manager olm-operator --replicas=0 kubectl delete operator -n <your-operator-namespace> <your-operator> kubectl scale deployment -n openshift-operator-lifecycle-manager olm-operator --replicas=1 ``` verify it on 4.7. LGTM -- [root@preserve-olm-env bin]# oc get pod -n openshift-operator-lifecycle-manager NAME READY STATUS RESTARTS AGE catalog-operator-7fd8476f47-c7tkv 1/1 Running 0 16m olm-operator-6fc884bdc9-nbcdx 1/1 Running 0 14m packageserver-6fc885578d-pzq2m 1/1 Running 0 14m packageserver-6fc885578d-qmr99 1/1 Running 0 16m [root@preserve-olm-env bin]# oc exec catalog-operator-7fd8476f47-c7tkv -n openshift-operator-lifecycle-manager -- olm --version OLM version: 0.17.0 git commit: 4b67acc560a790caa37fdff2f2c1a1eb50a4949f [root@preserve-olm-env bin]# [root@preserve-olm-env 1899588]# cat og-single.yaml kind: OperatorGroup apiVersion: operators.coreos.com/v1 metadata: name: og-single1 namespace: default spec: targetNamespaces: - default [root@preserve-olm-env 1899588]# oc apply -f og-single.yaml operatorgroup.operators.coreos.com/og-single1 created [root@preserve-olm-env 1899588]# cat teiidcatsrc.yaml apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: teiid namespace: default spec: displayName: "teiid Operators" image: quay.io/kuiwang/teiid-index:1898500 publisher: QE sourceType: grpc [root@preserve-olm-env 1899588]# oc apply -f teiidcatsrc.yaml catalogsource.operators.coreos.com/teiid created [root@preserve-olm-env 1899588]# cat teiidsub.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: teiid namespace: default spec: source: teiid sourceNamespace: default channel: alpha installPlanApproval: Automatic name: teiid [root@preserve-olm-env 1899588]# oc apply -f teiidsub.yaml subscription.operators.coreos.com/teiid created [root@preserve-olm-env 1899588]# [root@preserve-olm-env 1899588]# oc get sub NAME PACKAGE SOURCE CHANNEL teiid teiid teiid alpha [root@preserve-olm-env 1899588]# oc get ip NAME CSV APPROVAL APPROVED install-d9zb5 teiid.v0.3.0 Automatic true [root@preserve-olm-env 1899588]# oc get csv NAME DISPLAY VERSION REPLACES PHASE teiid.v0.3.0 Teiid 0.3.0 Installing [root@preserve-olm-env 1899588]# oc get csv NAME DISPLAY VERSION REPLACES PHASE teiid.v0.3.0 Teiid 0.3.0 Succeeded [root@preserve-olm-env 1899588]# oc get operators NAME AGE teiid.default 89s [root@preserve-olm-env 1899588]# [root@preserve-olm-env 1899588]# oc delete sub teiid subscription.operators.coreos.com "teiid" deleted [root@preserve-olm-env 1899588]# oc delete csv teiid.v0.3.0 clusterserviceversion.operators.coreos.com "teiid.v0.3.0" deleted [root@preserve-olm-env 1899588]# [root@preserve-olm-env 1899588]# oc get operator teiid.default -o yaml apiVersion: operators.coreos.com/v1 kind: Operator metadata: ... name: teiid.default resourceVersion: "40657" selfLink: /apis/operators.coreos.com/v1/operators/teiid.default uid: 57a42948-8349-4817-af41-2506a18282f4 spec: {} status: components: labelSelector: matchExpressions: - key: operators.coreos.com/teiid.default operator: Exists refs: - apiVersion: apiextensions.k8s.io/v1 conditions: - lastTransitionTime: "2021-02-19T02:16:50Z" message: no conflicts found reason: NoConflicts status: "True" type: NamesAccepted - lastTransitionTime: "2021-02-19T02:16:50Z" message: the initial names have been accepted reason: InitialNamesAccepted status: "True" type: Established - lastTransitionTime: "2021-02-19T02:16:50Z" message: 'spec.preserveUnknownFields: Invalid value: true: must be false' reason: Violations status: "True" type: NonStructuralSchema kind: CustomResourceDefinition name: virtualdatabases.teiid.io [root@preserve-olm-env 1899588]# [root@preserve-olm-env 1899588]# oc delete crd virtualdatabases.teiid.io customresourcedefinition.apiextensions.k8s.io "virtualdatabases.teiid.io" deleted [root@preserve-olm-env 1899588]# oc get operator teiid.default -o yaml apiVersion: operators.coreos.com/v1 kind: Operator metadata: ... name: teiid.default resourceVersion: "40979" selfLink: /apis/operators.coreos.com/v1/operators/teiid.default uid: 57a42948-8349-4817-af41-2506a18282f4 spec: {} status: components: labelSelector: matchExpressions: - key: operators.coreos.com/teiid.default operator: Exists [root@preserve-olm-env 1899588]# [root@preserve-olm-env 1899588]# oc delete operator teiid.default operator.operators.coreos.com "teiid.default" deleted [root@preserve-olm-env 1899588]# oc get operator teiid.default -o yaml Error from server (NotFound): operators.operators.coreos.com "teiid.default" not found -- 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.7.0 security, bug fix, and enhancement 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-2020:5633 I have experienced the same problem using a different platform. What was the workaround for fixing this problem on the opernshift platform? In case anyone else references this bug, please review this documentation [0] which details: - why the prometheus operator continues to appear in the `oc get operators` output. - How to fully remove the operator. Ref [0] https://github.com/operator-framework/olm-docs/pull/251/files |