[Description of problem] When a user enters the command: $ oc adm top node --help or $ oc adm top pod --help it is possible to see the word top repeated twice in examples like this: ~~~ $ oc adm top pod --help ... Examples: # Show metrics for all pods in the default namespace oc adm top top pod # Show metrics for all pods in the given namespace oc adm top top pod --namespace=NAMESPACE # Show metrics for a given pod and its containers oc adm top top pod POD_NAME --containers # Show metrics for the pods defined by label name=myLabel oc adm top top pod -l name=myLabel ... ~~~ Or like this: ~~~ $ oc adm top node --help ... Examples: # Show metrics for all nodes oc adm top top node # Show metrics for a given node oc adm top top node NODE_NAME ... ~~~ [Version-Release number of selected component (if applicable)] $ oc version Client Version: 4.4.3 Server Version: 4.3.21 Kubernetes Version: v1.16.2 But it was seen in previous versions [How reproducible] Always
This will be fixed with https://github.com/openshift/oc/pull/461
Verified with the version below and i see that the issue is fixed. [ramakasturinarra@dhcp35-60 ~]$ oc version Client Version: 4.6.0-202008120152.p0-ddbae76 Server Version: 4.6.0-0.nightly-2020-08-12-003456 Kubernetes Version: v1.19.0-rc.2+edbf229-dirty [ramakasturinarra@dhcp35-60 ~]$ oc adm top node --help Display Resource (CPU/Memory/Storage) usage of nodes. The top-node command allows you to see the resource consumption of nodes. Aliases: node, nodes, no Usage: oc adm top node [NAME | -l label] [flags] Examples: # Show metrics for all nodes oc adm top node # Show metrics for a given node oc adm top node NODE_NAME Options: --no-headers=false: If present, print output without headers -l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2) --sort-by='': If non-empty, sort nodes list using specified field. The field can be either 'cpu' or 'memory'. Use "oc adm options" for a list of global command-line options (applies to all commands). [ramakasturinarra@dhcp35-60 ~]$ oc adm top pod --help Display Resource (CPU/Memory/Storage) usage of pods. The 'top pod' command allows you to see the resource consumption of pods. Due to the metrics pipeline delay, they may be unavailable for a few minutes since pod creation. Aliases: pod, pods, po Usage: oc adm top pod [NAME | -l label] [flags] Examples: # Show metrics for all pods in the default namespace oc adm top pod # Show metrics for all pods in the given namespace oc adm top pod --namespace=NAMESPACE # Show metrics for a given pod and its containers oc adm top pod POD_NAME --containers # Show metrics for the pods defined by label name=myLabel oc adm top pod -l name=myLabel Options: -A, --all-namespaces=false: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. --containers=false: If present, print usage of containers within a pod. --no-headers=false: If present, print output without headers. -l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2) --sort-by='': If non-empty, sort pods list using specified field. The field can be either 'cpu' or 'memory'. Use "oc adm options" for a list of global command-line options (applies to all commands). Based on the above moving the bug to verified state.
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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196