Bug 1751541

Summary: In the nodes' dashboards, the CPU usage graph is in the wrong units
Product: OpenShift Container Platform Reporter: Udi Kalifon <ukalifon>
Component: Console Metal3 PluginAssignee: Honza Pokorny <hpokorny>
Status: CLOSED CURRENTRELEASE QA Contact: Udi Kalifon <ukalifon>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, hpokorny, jtomasek, spadgett, vlaad, wzheng
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-13 13:49:11 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:
Attachments:
Description Flags
CPU Usage graph none

Description Udi Kalifon 2019-09-12 06:39:54 UTC
Description of problem:
When viewing the node's CPU usage, the y axis is supposed to have units of percentage, but instead it's showing seconds.

When I looked at the graph when the node was idle, the y axis showed "500m" and "1", instead of "0.5%" and "1%". By comparison, the same graph in the bare metal host dashboard is showing the results correctly in percentages.


Version-Release number of selected component (if applicable):
4.2.0-0.nightly-2019-09-11-032939


How reproducible:
100%


Steps to Reproduce:
1. Browse to Compute -> Nodes
2. Click on one of the nodes
3. See the CPU usage graph in the node's dashboard


Actual results:
The units on the y axis are apparently seconds instead of percentages

Comment 1 Udi Kalifon 2019-09-12 07:16:15 UTC
Created attachment 1614329 [details]
CPU Usage graph

See attached screen shot of CPU Usage graph.

Comment 2 Jiri Tomasek 2019-09-12 09:14:57 UTC
It actually seems that the unit is correct in Nodes graph and is incorrect in baremetal host cpu utilisation graph. `instance:node_cpu:rate:sum` should use 'humanizeCpuCores' funnction to get correct units.

Comment 3 Udi Kalifon 2019-09-12 12:22:46 UTC
If I check on the node with "top" - I can see the CPU is measured in us. However, when I load the CPU and the usage climbs to ~7.6, the graphs show ~2.5. So the question is really what's the intended units of these graphs, and how to test the result for correctness. By the way to load the CPU - I run in the background: dd if=/dev/zero of=/dev/null &

Comment 4 Honza Pokorny 2019-09-12 13:25:27 UTC
The newly redesigned utilization card for the baremetal host has percentages.

https://docs.google.com/document/d/1q0DIcUKgFhvNbtGt-SMl35Z2jHA_QO2r7aaBuFmwE2U/edit#

Comment 6 Udi Kalifon 2019-09-17 06:51:35 UTC
We're expecting to see percentages, like in the design doc. There are now no units at all - just a plain number.

Comment 7 Honza Pokorny 2019-09-17 11:34:47 UTC
The PR linked changes the units on the CPU graph in the baremetal dashboard to be consistent with the one on the Node detail page.  As such, this shouldn't fail QA.  The percentages that you mention are part of the redesign of the utilization card, and this hasn't been implemented yet.

Comment 8 Wenjing Zheng 2019-10-11 07:45:30 UTC
(In reply to Udi from comment #6)
> We're expecting to see percentages, like in the design doc. There are now no
> units at all - just a plain number.

Udi, per comment #7, could you re-verify this bug?

Comment 11 Samuel Padgett 2019-11-12 15:05:15 UTC
I don't think we use should show percentages. I'd expect the values to be in cores and millicores.

Comment 12 Jiri Tomasek 2019-11-13 13:49:11 UTC
Bare Metal host CPU utilisation is consistent with other CPU utilisation graphs in other dashboards and uses cores/millicores (as described in https://bugzilla.redhat.com/show_bug.cgi?id=1751541#c7 and https://bugzilla.redhat.com/show_bug.cgi?id=1751541#c11). Closing. Feel free to reopen if needed.