Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2100930

Summary: oc adm upgrade runs default case for incorrect subcommand
Product: OpenShift Container Platform Reporter: Pratik Mahajan <pmahajan>
Component: ocAssignee: Over the Air Updates <aos-team-ota>
oc sub component: oc QA Contact: zhou ying <yinzhou>
Status: CLOSED DEFERRED Docs Contact:
Severity: medium    
Priority: unspecified CC: mfojtik
Version: 4.10   
Target Milestone: ---   
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: 2023-03-09 01:22:24 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 Pratik Mahajan 2022-06-24 17:45:44 UTC
Description of problem:
 
`oc adm upgrade` silently errors out on incorrect subcommand without doing/notifying anything
this is due to the `default` case in `run()` which catches all the incorrect subcommand and runs the default part instead. 


Version-Release number of selected component (if applicable): 4.10 and current


How reproducible:
use any incorrect subcommand with `oc adm upgrade`. 
example: `oc adm upgrade incorrect-subcommand`

Steps to Reproduce:
1. run `oc adm upgrade incorrect-subcommand`


Actual results:
oc prints the cluster upgrade status

Expected results:
oc should error out saying incorrect subcommand

Comment 1 Shiftzilla 2023-03-09 01:22:24 UTC
OpenShift has moved to Jira for its defect tracking! This bug can now be found in the OCPBUGS project in Jira.

https://issues.redhat.com/browse/OCPBUGS-9340