Bug 1959648

Summary: oc adm top --help indicates that oc adm top can display storage usage while it cannot
Product: OpenShift Container Platform Reporter: yhe
Component: ocAssignee: Filip Krepinsky <fkrepins>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: low Docs Contact:
Priority: low    
Version: 4.6CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Fix: Fixes `kubectl top --help` which should not claim to show Storage.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:08:01 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 yhe 2021-05-12 02:22:30 UTC
Description of problem:
oc adm top --help indicates that oc adm top can display storage usage, however, oc adm top can only display CPU and memory usage.

$ oc adm top --help
Show usage statistics of resources on the server

 This command analyzes resources managed by the platform and presents current
usage statistics.

Usage:
  oc adm top [flags]

Available Commands:
  images       Show usage statistics for Images
  imagestreams Show usage statistics for ImageStreams
  node         Display Resource (CPU/Memory/Storage) usage of nodes
  pod          Display Resource (CPU/Memory/Storage) usage of pods

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


How reproducible:
Always

Steps to Reproduce:
1. Run oc adm top --help command

Actual results:
It shows that oc adm top can display CPU/Memory/Storage usage

Expected results:
It shows that oc adm top can display CPU/Memory usage

Additional info:

Comment 2 Filip Krepinsky 2021-05-14 10:22:05 UTC
This was fixed in kubernetes v1.21 (https://github.com/kubernetes/kubernetes/pull/99060) and should be available in oc 4.8

Comment 4 zhou ying 2021-05-17 07:06:27 UTC
Confirmed with latest oc , only show cpu and memory now:

[root@localhost ~]# oc version --client
Client Version: 4.8.0-202104292348.p0.git.a765590-a765590

[root@localhost ~]# oc adm top -h
Show usage statistics of resources on the server

 This command analyzes resources managed by the platform and presents current usage statistics.

Usage:
  oc adm top [flags]

Available Commands:
  images       Show usage statistics for images
  imagestreams Show usage statistics for image streams
  node         Display Resource (CPU/Memory) usage of nodes
  pod          Display Resource (CPU/Memory) usage of pods
...

[root@localhost ~]# oc adm top node
NAME                           CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%   
ip-10-0-128-170.ec2.internal   334m         11%    3775Mi          25%       
ip-10-0-131-191.ec2.internal   526m         15%    6734Mi          46%       
ip-10-0-147-197.ec2.internal   1139m        37%    7792Mi          25%       
ip-10-0-151-66.ec2.internal    1188m        33%    7574Mi          51%       
ip-10-0-163-33.ec2.internal    107m         3%     2047Mi          6%        
ip-10-0-195-108.ec2.internal   93m          3%     1686Mi          11%       
ip-10-0-208-152.ec2.internal   717m         20%    8638Mi          59%       
ip-10-0-212-184.ec2.internal   103m         3%     1799Mi          12%       
ip-10-0-237-27.ec2.internal    150m         5%     1869Mi          12%

Comment 7 errata-xmlrpc 2021-07-27 23:08:01 UTC
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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438