Bug 1907792
Summary: | The `overrides` of the OperatorCondition cannot block the operator upgrade | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jian Zhang <jiazha> |
Component: | OLM | Assignee: | Evan Cordell <ecordell> |
OLM sub component: | OLM | QA Contact: | Jian Zhang <jiazha> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | vdinh |
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: | Environment: | ||
Last Closed: | 2021-02-24 15:43:55 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
Jian Zhang
2020-12-15 09:10:22 UTC
*** Bug 1909640 has been marked as a duplicate of this bug. *** The issue here is we use "OperatorUpgradeable" as the status. That is a mistake. We are correcting this to be "Upgradeable" as it is specified in the enhancement. Cluster version is 4.7.0-0.nightly-2021-01-04-215816 [root@preserve-olm-env data]# oc -n openshift-operator-lifecycle-manager exec catalog-operator-5b4b6587c4-2qgfb -- olm --version OLM version: 0.17.0 git commit: 69dc076d610b033d3964ed40c4ac27ece3424851 1, Install the etcdoperator v0.9.2 with Manual approval [root@preserve-olm-env data]# cat sub-etcd-cluster.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: etcd namespace: openshift-operators spec: channel: clusterwide-alpha installPlanApproval: Manual name: etcd source: community-operators sourceNamespace: openshift-marketplace startingCSV: etcdoperator.v0.9.2-clusterwide [root@preserve-olm-env data]# oc create -f sub-etcd-cluster.yaml subscription.operators.coreos.com/etcd created 2, Approve the v0.9.2 installation. [root@preserve-olm-env data]# oc get ip NAME CSV APPROVAL APPROVED install-2b8z7 etcdoperator.v0.9.4-clusterwide Manual false install-tcjbg etcdoperator.v0.9.2-clusterwide Manual true [root@preserve-olm-env data]# oc get csv NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.2-clusterwide etcd 0.9.2-clusterwide etcdoperator.v0.9.0 Installing [root@preserve-olm-env data]# oc get operatorcondition NAME AGE etcdoperator.v0.9.2-clusterwide 38s 3, Add the `overrides` field to this OperatorCondition etcdoperator.v0.9.2-clusterwide. ... spec: deployments: - etcd-operator serviceAccounts: - etcd-operator overrides: - message: Disbale the upgrade. reason: upgradeIsNotSafe status: "False" type: Upgradeable [root@preserve-olm-env data]# oc edit operatorcondition etcdoperator.v0.9.2-clusterwide error: operatorconditions.operators.coreos.com "etcdoperator.v0.9.2-clusterwide" is invalid operatorcondition.operators.coreos.com/etcdoperator.v0.9.2-clusterwide edited 4, Approve the v0.9.4 installation. [root@preserve-olm-env data]# oc get ip NAME CSV APPROVAL APPROVED install-2b8z7 etcdoperator.v0.9.4-clusterwide Manual true install-tcjbg etcdoperator.v0.9.2-clusterwide Manual true [root@preserve-olm-env data]# oc get csv NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.2-clusterwide etcd 0.9.2-clusterwide etcdoperator.v0.9.0 Replacing etcdoperator.v0.9.4-clusterwide etcd 0.9.4-clusterwide etcdoperator.v0.9.2-clusterwide Pending As you can see, the v0.9.4 CSV in `Pending` status. [root@preserve-olm-env data]# oc describe csv etcdoperator.v0.9.4-clusterwide Name: etcdoperator.v0.9.4-clusterwide ... Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal RequirementsUnknown <invalid> operator-lifecycle-manager requirements not yet checked Normal OperatorConditionNotUpgradeable <invalid> operator-lifecycle-manager operator is not upgradeable: The operator is not upgradeable: Disbale the upgrade. 5, Change the Upgradable status of the etcdoperator.v0.9.2-clusterwide to "True" from the "False". [root@preserve-olm-env data]# oc get operatorcondition NAME AGE etcdoperator.v0.9.2-clusterwide 13m etcdoperator.v0.9.4-clusterwide 10m [root@preserve-olm-env data]# oc edit operatorcondition etcdoperator.v0.9.2-clusterwide error: operatorconditions.operators.coreos.com "etcdoperator.v0.9.2-clusterwide" is invalid operatorcondition.operators.coreos.com/etcdoperator.v0.9.2-clusterwide edited [root@preserve-olm-env data]# oc get operatorcondition NAME AGE etcdoperator.v0.9.4-clusterwide 11m [root@preserve-olm-env data]# oc get csv NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.4-clusterwide etcd 0.9.4-clusterwide etcdoperator.v0.9.2-clusterwide Succeeded [root@preserve-olm-env data]# [root@preserve-olm-env data]# oc get pods NAME READY STATUS RESTARTS AGE etcd-operator-5b8f9c4fbc-jhn5d 3/3 Running 0 30s etcd-operator-869664477d-t57vn 0/3 Terminating 0 15m The v0.9.2 can be upgraded to v0.9.4 successfully, looks good to me, verify it. 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 |