Bug 2045081

Summary: oc outputs wrong message 'specify --to-image or wait' for 'oc adm upgrade --to-image' command
Product: OpenShift Container Platform Reporter: Evgeni Vakhonin <evakhoni>
Component: ocAssignee: W. Trevor King <wking>
Status: CLOSED DUPLICATE QA Contact: Evgeni Vakhonin <evakhoni>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.10CC: aos-bugs, mfojtik, yanyang
Target Milestone: ---Keywords: Regression
Target Release: ---   
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: 2022-02-01 09:04:38 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 Evgeni Vakhonin 2022-01-25 15:07:44 UTC
Description of problem:
in situation when the cluster is on a channel with no upgrade path,
running 'oc adm upgrade --to-image' should result in a message:
'you must pass --allow-explicit-upgrade to continue'
however in latest 4.10 oc versions, the error received is different, and incorrect:
'error: no recommended updates, specify --to-image or wait for new updates to be available'
while in reality we already specified --to-image

Version-Release number of selected component (if applicable):
Client Version: 4.10.0-0.nightly-2022-01-25-023600

How reproducible:
100%

Steps to Reproduce:
install a cluster which is the latest version for its channel
use the latest oc tools
run oc adm upgrade --to-image <some image digest not in the upgrade graph>

Actual results:
#oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:87c1f0019d44107031c662a3c387bba46d1f2710909b583e5f4c0ad61cdba36e
error: no recommended updates, specify --to-image or wait for new updates to be available

Expected results:
#oc adm upgrade --to-image registry.ci.openshift.org/ocp/release@sha256:87c1f0019d44107031c662a3c387bba46d1f2710909b583e5f4c0ad61cdba36e
error: The requested upgrade image is not one of the available updates, you must pass --allow-explicit-upgrade to continue

Comment 1 W. Trevor King 2022-02-01 09:04:38 UTC

*** This bug has been marked as a duplicate of bug 2044140 ***