Description of problem: Run "oc adm upgrade --to-latest=true" to manually update current cluster to latest available version, but it dose not choose the actual "latest" version in the list. Checked 4.1 nightly builds on https://openshift-release.svc.ci.openshift.org/, the top three is as following(4.1.0-0.nightly-2019-05-22-190823 should be latest): Name Phase Started Tests Upgrades 4.1.0-0.nightly-2019-05-22-190823 Accepted 13 hours ago aws aws-serial 4.1.0-rc.5 4.1.0-0.nightly-2019-05-22-050858 Accepted 1 day ago aws aws-serial 4.1.0-rc.5 4.1.0-0.nightly-2019-05-21-060354 Accepted 2 days ago aws aws-serial 4.1.0-rc.5 [root@preserve-jliu-worker 20190523_15261]# ./oc adm upgrade Cluster version is 4.1.0-rc.5 Updates: VERSION IMAGE 4.1.0-0.nightly-2019-05-21-060354 registry.svc.ci.openshift.org/ocp/release@sha256:65236cc32eb9972f661aecd7da4f3bfba61414c0c26730ea85549378c6c08d3e 4.1.0-0.nightly-2019-05-22-190823 registry.svc.ci.openshift.org/ocp/release@sha256:bd0af072c542d6a4aa614151a6caf9f69a197b33e0f57dc180ea795a7baf0159 4.1.0-0.nightly-2019-05-22-050858 registry.svc.ci.openshift.org/ocp/release@sha256:29e03d18fb7fe375bc5d103f22df3343fc40843a6acfbb52b785b7f3aee3921f [root@preserve-jliu-worker 20190523_15261]# ./oc adm upgrade --to-latest=true Updating to latest version 4.1.0-0.nightly-2019-05-22-050858 [root@preserve-jliu-worker 20190523_15261]# oc get clusterversion -o json|jq ".items[0].spec" { "channel": "stable-4.1", "clusterID": "0ba7c984-7295-4158-b899-53a0fbcb8a24", "desiredUpdate": { "force": false, "image": "registry.svc.ci.openshift.org/ocp/release@sha256:29e03d18fb7fe375bc5d103f22df3343fc40843a6acfbb52b785b7f3aee3921f", "version": "4.1.0-0.nightly-2019-05-22-050858" }, "upstream": "https://openshift-release.svc.ci.openshift.org/graph" } Version-Release number of the following components: 4.1.0-rc.5 How reproducible: always Steps to Reproduce: 1. Run "# ./oc adm upgrade --to-latest=true" to update current cluster to latest available version(there should be more than 1 payload in the list) 2. 3. Actual results: "--to-latest=true" did not update cluster to latest available version Expected results: Should choose the latest build as desiredUpdate Additional info: Please attach logs from ansible-playbook with the -vvv flag
Good catch. There's a missing != here [1]. I'll file a fix in a few hours if nobody else has time before that ;). [1]: https://github.com/openshift/origin/blob/63800253b3ad38ee1dfa5059e8db1cfee6e3190c/pkg/oc/cli/admin/upgrade/upgrade.go#L346
This was eating at me, so I just went ahead and worked up the master PR: https://github.com/openshift/origin/pull/22893 Bot will cherry-pick back to 4.1 when the master PR lands.
4.1 backport: https://github.com/openshift/origin/pull/22897
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, 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/RHBA-2019:1635