Bug 2213450 - Set ​​maxOpenShiftVersion to block OpenShift that didn't upgrade ODF version
Summary: Set ​​maxOpenShiftVersion to block OpenShift that didn't upgrade ODF version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: odf-operator
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ODF 4.10.14
Assignee: Nitin Goyal
QA Contact: Vijay Avuthu
URL:
Whiteboard:
Depends On: 2213451
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-08 07:57 UTC by Eran Tamir
Modified: 2023-08-28 09:05 UTC (History)
7 users (show)

Fixed In Version: 4.10.14-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2213451 (view as bug list)
Environment:
Last Closed: 2023-07-20 16:16:33 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage odf-operator pull 316 0 None Merged makefile: block OCP upgrades beyond the X+1 version 2023-06-09 09:46:09 UTC
Github red-hat-storage odf-operator pull 320 0 None open Bug 2213450:[release-4.10] makefile: block OCP upgrades beyond the X+1 version 2023-07-03 05:44:40 UTC
Red Hat Product Errata RHSA-2023:4241 0 None None None 2023-07-20 16:16:49 UTC

Description Eran Tamir 2023-06-08 07:57:00 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Currently, we don't block OpenShift upgrades when the ODF version is not compatible. For example, when the ODF version is 4.10 and the OpenShift version is 4.11, we should block an upgrade to 4.12 as ODF 4.10 is incompatible. 



Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?

Yes. It may cause and issue and ends with a support call. 

Is there any workaround available to the best of your knowledge?

Sometimes manual changes in the CSV can help, but it involves support and may help just to upgrade to the relevant ODF version, while part of the service may be impacted. 

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?

1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?

Yes

Comment 5 Nitin Goyal 2023-07-03 06:12:02 UTC
PR is merged.

Comment 8 Vijay Avuthu 2023-07-18 15:03:35 UTC
Update:
=======

1. Installed OCP 4.10 ( 4.10.63 ) + ODF 4.10 ( 4.10.14-1 )
2. set channel to stable-4.11 and upgraded to latest image available in channel

$ oc patch clusterversions/version -p '{"spec":{"channel":"stable-4.11"}}' --type=merge
clusterversion.config.openshift.io/version patched
$ oc adm upgrade --to-image=quay.io/openshift-release-dev/ocp-release@sha256:52cbfbbeb9cc03b49c2788ac7333e63d3dae14673e01a9d8e59270f3a8390ed3 
Requesting update to 4.11.44

$ oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.44   True        False         33m     Cluster version is 4.11.44

3. set channel to stable-4.12 and tried upgrading to latest image available and its not triggered the upgrade which is expected

$ oc patch clusterversions/version -p '{"spec":{"channel":"stable-4.12"}}' --type=merge
clusterversion.config.openshift.io/version patched

$ oc adm upgrade --to-latest
Requesting update to 4.12.23

$ oc adm upgrade
Cluster version is 4.11.44

Upgradeable=False

  Reason: IncompatibleOperatorsInstalled
  Message: Cluster operator operator-lifecycle-manager should not be upgraded between minor versions: ClusterServiceVersions blocking cluster upgrade: openshift-storage/odf-operator.v4.10.14 is incompatible with OpenShift minor versions greater than 4.11

ReleaseAccepted=False

  Reason: PreconditionChecks
  Message: Preconditions failed for payload loaded version="4.12.23" image="quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417": Precondition "ClusterVersionUpgradeable" failed because of "IncompatibleOperatorsInstalled": Cluster operator operator-lifecycle-manager should not be upgraded between minor versions: ClusterServiceVersions blocking cluster upgrade: openshift-storage/odf-operator.v4.10.14 is incompatible with OpenShift minor versions greater than 4.11

Upstream is unset, so the cluster will use an appropriate default.
Channel: stable-4.12 (available channels: candidate-4.11, candidate-4.12, eus-4.12, fast-4.11, fast-4.12, stable-4.11, stable-4.12)

Recommended updates:

  VERSION     IMAGE
  4.12.23     quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417

4. tried upgrading using digest as well and upgrade is not triggered as expected
$ oc adm upgrade --to-image=quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417 --allow-explicit-upgrade
Requesting update to 4.12.23
vijay ~/rem $ oc adm upgrade
Cluster version is 4.11.44

Upgradeable=False

  Reason: IncompatibleOperatorsInstalled
  Message: Cluster operator operator-lifecycle-manager should not be upgraded between minor versions: ClusterServiceVersions blocking cluster upgrade: openshift-storage/odf-operator.v4.10.14 is incompatible with OpenShift minor versions greater than 4.11

ReleaseAccepted=False

  Reason: PreconditionChecks
  Message: Preconditions failed for payload loaded version="4.12.23" image="quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417": Precondition "ClusterVersionUpgradeable" failed because of "IncompatibleOperatorsInstalled": Cluster operator operator-lifecycle-manager should not be upgraded between minor versions: ClusterServiceVersions blocking cluster upgrade: openshift-storage/odf-operator.v4.10.14 is incompatible with OpenShift minor versions greater than 4.11

Upstream is unset, so the cluster will use an appropriate default.
Channel: stable-4.12 (available channels: candidate-4.11, candidate-4.12, eus-4.12, fast-4.11, fast-4.12, stable-4.11, stable-4.12)

Recommended updates:

  VERSION     IMAGE
  4.12.23     quay.io/openshift-release-dev/ocp-release@sha256:2309578b68c5666dad62aed696f1f9d778ae1a089ee461060ba7b9514b7ca417

$ oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.44   True        False         104m    Cluster version is 4.11.44


> checked olm.properties and maxOpenShiftVersion version is set properly

$ $ oc get csv odf-operator.v4.10.14 -o json | jq '.metadata.annotations."olm.properties"'
"[{\"type\": \"olm.maxOpenShiftVersion\", \"value\": \"4.11\"}]"

Comment 13 errata-xmlrpc 2023-07-20 16:16:33 UTC
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: Red Hat OpenShift Data Foundation 4.10.14 security and bug fix 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-2023:4241


Note You need to log in before you can comment on or make changes to this bug.