Bug 1989504
Summary: | The code logic of channel clear is ambiguous, as well as the help info and output messages | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Yang Yang <yanyang> |
Component: | oc | Assignee: | W. Trevor King <wking> |
Status: | CLOSED ERRATA | QA Contact: | Yang Yang <yanyang> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.9 | CC: | aos-bugs, jokerman, mfojtik |
Target Milestone: | --- | ||
Target Release: | 4.9.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-10-18 17:44:09 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
Yang Yang
2021-08-03 11:12:04 UTC
Trevor, I'm attempting to fix it by [1]. Please take a look. If I misunderstand it, it's fine to reject it. Thanks! [1] https://github.com/openshift/oc/pull/891 Verifying with # oc version Client Version: 4.9.0-0.nightly-2021-09-01-193941 Server Version: 4.9.0-0.nightly-2021-08-28-082738 Kubernetes Version: v1.22.0-rc.0+b708912 # oc adm upgrade channel --help Set or clear the update channel. This command will set or clear the update channel, which impacts the list of updates recommended for the cluster. If desired channel is empty, the command will clear the update channel. If there is a list of acceptable channels and the current update channel is in that list, you must pass --allow-explicit-channel to allow channel clear to proceed. If desired channel is not empty, the command will set the update channel to it. If there is a list of acceptable channels and the desired channel is not in that list, you must pass --allow-explicit-channel to allow channel change to proceed. # oc adm upgrade Cluster version is 4.9.0-0.nightly-2021-08-28-082738 Upstream: https://raw.githubusercontent.com/shellyyang1989/upgrade-cincy/master/cincy3.json Channel: channel-b (available channels: channel-a, channel-b) Updates: VERSION IMAGE 4.9.0-0.nightly-2021-08-28-134805 registry.ci.openshift.org/ocp/release@sha256:a10a4358850af7b5c288e81be38b92673cabd79f1f59d8e632dc122e5ab0561b Set a channel which is same as the current channel # oc adm upgrade channel channel-b info: Cluster is already in channel-b (no change) Clear a known channel which is in the available channels w/o --allow-explicit-channel # oc adm upgrade channel error: You are requesting to clear the update channel. The current channel "channel-b" is one of the available channels, you must pass --allow-explicit-channel to continue Clear a known channel which is in the available channels w/ --allow-explicit-channel # oc adm upgrade channel --allow-explicit-channel warning: Clearing channel "channel-b"; cluster will no longer request available update recommendations. Re-clear the channel # oc adm upgrade channel info: Cluster channel is already clear (no change) Set to an unknown channel when the available channels are not present w/o --allow-explicit-channel # oc adm upgrade channel channel-d warning: No channels known to be compatible with the current version "4.9.0-0.nightly-2021-08-28-082738"; unable to validate "channel-d". Setting the update channel to "channel-d" anyway. Set to an unknown channel which is not in the available channels w/o --allow-explicit-channel # oc adm upgrade channel channel-f error: the requested channel "channel-f" is not one of the available channels (channel-a, channel-b), you must pass --allow-explicit-channel to continue Set to an unknown channel which is not in the available channels w/ --allow-explicit-channel # oc adm upgrade channel channel-f --allow-explicit-channel warning: The requested channel "channel-f" is not one of the available channels (channel-a, channel-b). You have used --allow-explicit-channel to proceed anyway. Setting the update channel to "channel-f". Clear an unknown channel which is not in the available channels w/o --allow-explicit-channel # oc adm upgrade channel warning: Clearing channel "channel-f"; cluster will no longer request available update recommendations. Set to a known channel when the available channels are not present # oc adm upgrade channel channel-a warning: No channels known to be compatible with the current version "4.9.0-0.nightly-2021-08-28-082738"; unable to validate "channel-a". Setting the update channel to "channel-a" anyway. Set to a known channel w/o --allow-explicit-channel # oc adm upgrade channel channel-b Moving it to verified. 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.9.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-2021:3759 |