Bug 2044140
| Summary: | When 'oc adm upgrade --to-image ...' rejects an update as not recommended, it should mention --allow-explicit-upgrade | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yunfei Jiang <yunjiang> | |
| Component: | oc | Assignee: | Lalatendu Mohanty <lmohanty> | |
| oc sub component: | oc | QA Contact: | Evgeni Vakhonin <evakhoni> | |
| Status: | CLOSED ERRATA | Docs Contact: | ||
| Severity: | low | |||
| Priority: | low | CC: | aos-bugs, evakhoni, lmohanty, mfojtik, wking, wlewis, yanyang | |
| Version: | 4.10 | Keywords: | Regression | |
| Target Milestone: | --- | |||
| Target Release: | 4.11.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | No Doc Update | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2051267 (view as bug list) | Environment: | ||
| Last Closed: | 2022-08-10 10:43:39 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: | 2051267 | |||
|
Description
Yunfei Jiang
2022-01-24 05:53:12 UTC
done some pre-merge on this one.. reproducing: Client Version: 4.10.0-0.nightly-2022-01-29-094046 oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: cannot refresh available updates: Reason: VersionNotFound Message: Unable to retrieve available updates: currently reconciling cluster version 4.10.0-0.nightly-2022-01-29-094046 not found in the "stable-4.10" channel verifying: cluster-bot build openshift/oc#1041 Client Version: 4.10.0-0.ci.test-2022-01-30-114824-ci-ln-v7j1j6k-latest oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: cannot refresh available updates: Reason: VersionNotFound Message: Unable to retrieve available updates: currently reconciling cluster version 4.10.0-0.ci.test-2022-01-30-114824-ci-ln-v7j1j6k-latest not found in the "stable-4.10" channel hmm... looks like the PR haven't changed the behavior.. is it still WIP?? The error message you were looking for was at https://github.com/openshift/oc/blob/fd5446fb51074372e95b9133adcab1cbfec4682e/pkg/cli/admin/upgrade/upgrade.go#L280. The Code has gone through refactoring [1] while adding flag --allow-not-recommended to oc adm upgrade. The refactoring was done to make code behave similar way for both --to and --to-image. I am not sure if we should go back to the previous error messages which was specific to --to-image. I have updated the PR again and waiting to see what others reviewers think. [1] https://github.com/openshift/oc/commit/6c8d9352d3e459a44faa0de6209d761aae25ff47#diff-95dd836dcdd15c8809f02598420db11692d674c596a8a488980187f68c9ef1e6 *** Bug 2045081 has been marked as a duplicate of this bug. *** Bug 2045081 is adjacent, so re-scoping this bug to cover these cases [1]: * RetrievedUpdates!=True (original scope for this bug) * No targets, and --allow-not-recommended set * No targets, and --allow-not-recommended not set (original scope of bug 2045081) * Some targets, but the requested image was not one of them. * I dunno if it's possible to hit the 'default' case. Maybe we don't need formal QE verification of the default case. [1]: https://github.com/openshift/oc/blob/d09c0aa3a764e3040a07ad0fbe320bcd500f2941/pkg/cli/admin/upgrade/upgrade.go#L306-L317 hmm.. just checked Client Version: 4.11.0-0.nightly-2022-02-03-131620 Server Version: 4.11.0-0.nightly-2022-02-03-131620 oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: cannot refresh available updates: Reason: VersionNotFound Message: Unable to retrieve available updates: currently reconciling cluster version 4.11.0-0.nightly-2022-02-03-131620 not found in the "stable-4.10" channel specify --to-image to continue with the update. is asking for "--to-image" when --to-image is already supplied, which is what i reported in bug 2045081 btw is [1] this condition wrong? [1]: https://github.com/openshift/oc/blob/master/pkg/cli/admin/upgrade/upgrade.go#L307 reproducing Client Version: 4.10.0-0.nightly-2022-02-05-132417 Server Version: 4.10.0-0.nightly-2022-02-05-132417 *case: source version not in the graph: #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: cannot refresh available updates: Reason: VersionNotFound Message: Unable to retrieve available updates: currently reconciling cluster version 4.10.0-0.nightly-2022-02-05-132417 not found in the "stable-4.10" channel *case: no targets, --allow-not-recommended applied #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 --allow-not-recommended error: no recommended or conditional updates, specify --to-image or wait for new updates to be available *case: no targets, --allow-not-recommended not applied: #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: no recommended updates, specify --to-image or wait for new updates to be available *case: some targets, requested != targets #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: the update is not one of the possible targets: 4.10.0-0.nightly-2021-12-23-153012 *case: some targets, requested != targets, --allow-not-recommended applied #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 --allow-not-recommended error: the update is not one of the possible targets: 4.10.0-0.nightly-2021-12-23-153012 verifying Client Version: 4.11.0-0.nightly-2022-02-05-152519 Server Version: 4.11.0-0.nightly-2022-02-05-152519 *case: source version not in the graph: #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: cannot refresh available updates: Reason: VersionNotFound Message: Unable to retrieve available updates: currently reconciling cluster version 4.11.0-0.nightly-2022-02-05-152519 not found in the "stable-4.10" channel specify --allow-explicit-upgrade to continue with the update. *case: no targets, --allow-not-recommended applied #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 --allow-not-recommended error: no recommended or conditional updates, specify --allow-explicit-upgrade to continue with the update or wait for new updates to be available. *case: no targets, --allow-not-recommended not applied: #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: no recommended updates, specify --allow-explicit-upgrade to continue with the update or wait for new updates to be available. *case: some targets, requested != targets #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 error: the update is not one of the possible targets: 4.11.0-0.nightly-2022-02-05-211325. specify --allow-explicit-upgrade to continue with the update. *case: some targets, requested != targets, --allow-not-recommended applied #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 --allow-not-recommended error: the update is not one of the possible targets: 4.11.0-0.nightly-2022-02-05-211325. specify --allow-explicit-upgrade to continue with the update. so far so good. now lets see no "specify --allow-explicit-upgrade" when it shouldn't be. *case some targets, requested != targets, without --to-image #oc adm upgrade --to 4.9.19 error: the update is not one of the possible targets: 4.11.0-0.nightly-2022-02-05-211325. specify --to-image to continue with the update. *case some targets, requested != targets, with -to-image, --allow-explicit-upgrade #oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 --allow-explicit-upgrade warning: The requested upgrade image is not one of the available updates.You have used --allow-explicit-upgrade for the update to proceed anyway Updating to release image registry.ci.openshift.org/ocp/release@sha256:f1b711b1f476d021d0bdc2b88cd28d5b92e4459b49c787db2129c6c1aaf26652 as expected. 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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-2022:5069 |