Users are allowed (and in pre-prod environments, encouraged) to upgrade clusters to versions that may not be in a stable channel. In addition, between minor versions of the product (4.1 and 4.2) edges may not be created in the stable channel, but we want users to try it out.
To try that out today requires `oc adm upgrade --force` which bypasses signature verification and introduces a security risk. The CLI really should not force that choice on users, and in 4.3 we anticipate adding additional checks that have nothing to do with that behavior.
For 4.1 and 4.2 we should split the --force flag in oc adm upgrade to only apply to server override, and use more specific flags for client side override (--allow-explicit-upgrade for using --to-image, and --allow-unsafe-upgrade for bypassing cluster version failure and upgrade in progress).
Verified on 4.3.0-0.nightly-2019-10-15-225018
1. check for --allow-upgrade-with-warnings
1) install 4.3.0-0.nightly-2019-10-15-180816
2) upgrade to one of available update
# oc adm upgrade --to 4.3.0-0.nightly-2019-10-15-225018 --force
Updating to 4.3.0-0.nightly-2019-10-15-225018
# oc adm upgrade
info: An upgrade is in progress. Working towards 4.3.0-0.nightly-2019-10-15-225018: 17% complete
3) upgrade to one of available update of 4.3.0-0.nightly-2019-10-15-225018
# oc adm upgrade --to 4.3.0-0.nightly-2019-10-16-030711
error: Already upgrading, pass --allow-upgrade-with-warnings to override.
Message: Working towards 4.3.0-0.nightly-2019-10-15-225018: 17% complete
4) add required variable
# oc adm upgrade --to 4.3.0-0.nightly-2019-10-16-030711 --allow-upgrade-with-warnings
Updating to 4.3.0-0.nightly-2019-10-16-030711
2. check for --allow-explicit-upgrade
1) initial version 4.3.0-0.nightly-2019-10-15-225018
2) upgrade to a payload not in available update
# oc adm upgrade --to-image registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-10-16-010826 --force
error: The requested upgrade image is not one of the available updates, you must pass --allow-explicit-upgrade to continue
3) add required variable
# oc adm upgrade --to-image registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-10-16-010826 --force --allow-explicit-upgrade
Updating to release image registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-10-16-010826
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.