Add oc adm upgrade prototype command#21605
Add oc adm upgrade prototype command#21605openshift-merge-robot merged 2 commits intoopenshift:masterfrom
oc adm upgrade prototype command#21605Conversation
If `oc adm release info` is provided without arguments and the user is connected to a 4.0 cluster, attempt to locate the current release image and show those details to the user.
|
@derekwaynecarr @crawford @abhinavdahiya @spadgett This is just the sketch for the upgrade command, some of the changes in You can also run |
bd433b6 to
9856b73
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This command will update the cluster version object on a 4.0 or newer cluster and provide information about available versions. It uses the status provided by the cluster version operator on the object to inform the user of any errors or upgrades in progress.
9856b73 to
65cce8c
Compare
|
New changes are detected. LGTM label has been removed. |
|
/retest |
| } | ||
| args = []string{image} | ||
| } | ||
| if len(args) < 1 { |
There was a problem hiding this comment.
I prefer when we fail fast, I still remember you've been picky about it in one of my early PRs.
…uster upgrades" The previous: This command will request that the cluster begin an upgrade... and similar confused some readers [1], because the no-argument invocation is just a read query that does not request an update. This commit makes the wording more generic, to match the subcommand's actual generic functionality (reading from and optionally writing to ClusterVersion). I've also tweaked the "No updates available" message to avoid folks misreading as: ... doing so may not... result in downtime or data loss. when we are trying to convey that updating despite a lack of recommendations might be dangerous. In both cases, the wording I'm altering dates back to the creation of this subcommand in cd30f2f (Add `oc adm upgrade` to display available updates or trigger an update, 2018-12-04, openshift/origin#21605). [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1992680#c2
The outgoing wording dates back to the initial subcommand implementation in openshift/origin@65cce8c37d (Add `oc adm upgrade` to display available updates or trigger an update, 2018-12-04, openshift/origin#21605). But "force" is easy to conflate with the --force option, and we occasionally hear of users who set --force under the mistaken impression that it is related to the recommended-ness of the target release image. There's already a paragraph in the generic --help text discussing the risks of --allow-explicit-upgrade, and folks who use --to-image in the absence of recommended updates will hear about --allow-explicit-upgrade when a bare --to-image fails to turn up the requested pullspec in availableUpdates.
The outgoing wording dates back to the initial subcommand implementation in openshift/origin@65cce8c37d (Add `oc adm upgrade` to display available updates or trigger an update, 2018-12-04, openshift/origin#21605). But "force" is easy to conflate with the --force option, and we occasionally hear of users who set --force under the mistaken impression that it is related to the recommended-ness of the target release image. This message is only rendered when availableUpdates is empty, so --to-image is unlikely to be sufficient. The current output will be: $ oc adm upgrade --to-image quay.io/openshift-release-dev/ocp-release@sha256:20e270c3349fe2fcb38fd0da155329babc02d6b53e7e06ff235346c3c1cf11b5 error: no recommended updates, specify --allow-explicit-upgrade to continue with the update or wait for new updates to be available. which we could stiffen up by including some of --help's current warnings about --allow-explicit-upgrade risk, but we can address that in follow-up work.
Also allow retrieving the current release info when connected to a 4.0 cluster.