OpenShift Container Platform (OCP) 4 upgrade paths
Environment
- OpenShift Container Platform 4
Issue
- What are the upgrade paths in OpenShift 4?
- How to upgrade to the next minor version of OpenShift 4?
NOTE: For upgrades using oc cli command, please check also this solution.
Resolution
Automated / Service
Customers can now use the Red Hat provided This content is not included.OpenShift Upgrade Graph visualizer and update planner, to view channel graphs or plan an upgrade from one version to another.
Manual
The commands below can be used to list the available upgrade paths.
The <CHANNEL> query parameter needs to be specified based on the OpenShift cluster's channel. The allowed channels are listed in the OpenShift 4.2 upgrades phased roll-out article.
The <ARCH> query parameter needs to be the same as the cluster's architecture. The amd64 arch is used to indicate the x86_64 architecture in the examples below.
NOTE: The jq utility is available in the rhel-7-server-ose-4.2-rpms for RHEL7 and the default AppStream for RHEL8. It is not available in the standard RHEL7 repositories.
$ curl -H "Accept: application/json" https://api.openshift.com/api/upgrades_info/v1/graph?channel=<CHANNEL>&arch=<ARCH> | jq '.'
A dot graph can also be generated which may make it easier to understand the available upgrade paths. First, download the available graph.sh file: Content from github.com is not included.Content from github.com is not included.https://github.com/openshift/cincinnati/blob/master/hack/graph.sh.
$ curl -sH 'Accept:application/json' 'https://api.openshift.com/api/upgrades_info/v1/graph?channel=fast-4.2&arch=amd64' | ./graph.sh | dot -Tsvg > graph.svg
Below is example output for the fast-4.2 channel as of 2019-12-06. Note that this output will most likely change at later dates, and is shown for demonstration purposes only.
Alternatively, the upgrade path from a current version to the next available version can also be checked using curl command after exporting the CURRENT_VERSION and CHANNEL_NAME variables:
$ export CURRENT_VERSION=4.2.18;
$ export CHANNEL_NAME=fast-4.3;
$
$ curl -sH 'Accept:application/json' "https://api.openshift.com/api/upgrades_info/v1/graph?channel=${CHANNEL_NAME}" | jq -r --arg CURRENT_VERSION "${CURRENT_VERSION}" '. as $graph | $graph.nodes | map(.version=='\"$CURRENT_VERSION\"') | index(true) as $orig | $graph.edges | map(select(.[0] == $orig)[1]) | map($graph.nodes[.].version) | sort_by(.)'
[
"4.2.19",
"4.3.1"
]
$
Root Cause
A definitive document containing the OpenShift 4 upgrade paths does not exist.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.