Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1691603 - CPU usage unit under "workloads -> pods" is wrong
Summary: CPU usage unit under "workloads -> pods" is wrong
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
: 1692321 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-22 03:04 UTC by Junqi Zhao
Modified: 2019-03-26 12:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-26 12:05:10 UTC
Target Upstream Version:


Attachments (Terms of Use)
CPU usage under "workloads -> pods" (deleted)
2019-03-22 03:04 UTC, Junqi Zhao
no flags Details
CPU usage under "home-> status -> dashboard" (deleted)
2019-03-22 03:05 UTC, Junqi Zhao
no flags Details

Description Junqi Zhao 2019-03-22 03:04:41 UTC
Created attachment 1546747 [details]
CPU usage under "workloads -> pods"

See the attached pictures
CPU usage under "home-> status -> dashboard" is right, it is 541.3519nm
prometheus expression for CPU usage is
namespace:container_cpu_usage:sum{namespace='deploy1'}

Checked value from prometheus, it is about 541.3519nm, almost the same with that under "home-> status -> dashboard" 
namespace:container_cpu_usage:sum{namespace="deploy1"}	0.0000005413518518518397

CPU usage under "workloads -> pods" is wrong, it is 541.3519um
prometheus expression for CPU usage is
pod_name:container_cpu_usage:sum{pod_name='example-744756c565-sffzb',namespace='deploy1'} * 1000

Checked value from prometheus, it is 0.0005413518518518397, about 541.3519um, but the value has been 1000 times of the actually value,
so it should 541.3519nm
{namespace="deploy1",pod_name="example-744756c565-sffzb"}	0.0005413518518518397

1 m core = 1000 mm core = 1000,000 um = 1000,000,000 nm
This issue is only happen for cpu usgage is nm and um, don't have this issue for mm core and m core
Version-Release number of selected component (if applicable):
4.0.0-0.nightly-2019-03-20-153904

How reproducible:
Only for cpu usgage is nm and um

Steps to Reproduce:
1. See the description part
2.
3.

Actual results:
CPU usage unit under "workloads -> pods" is wrong

Expected results:


Additional info:

Comment 1 Junqi Zhao 2019-03-22 03:05:32 UTC
Created attachment 1546748 [details]
CPU usage under "home-> status -> dashboard"

Comment 2 Samuel Padgett 2019-03-22 12:07:40 UTC
> pod_name:container_cpu_usage:sum{pod_name='example-744756c565-sffzb',namespace='deploy1'} * 1000

If Prometheus is returning cores here, we shouldn't be multiplying by 1000.

Comment 3 Samuel Padgett 2019-03-22 16:32:18 UTC
It looks like we're multiplying by 1000 to show the value as millicores, but the value is so small here that plotly is displaying it using scientific prefixes. So you're seeing micro-millicores (which aren't actually a thing).

The simple fix is to display it as cores and correctly label the charts.

Comment 4 Samuel Padgett 2019-03-22 18:30:47 UTC
https://github.com/openshift/console/pull/1323

Comment 5 lserven 2019-03-25 14:27:44 UTC
*** Bug 1692321 has been marked as a duplicate of this bug. ***

Comment 6 Junqi Zhao 2019-03-26 06:35:57 UTC
CPU usage under "home-> status -> dashboard" is the same with that under "workloads -> pods"
payload: 4.0.0-0.nightly-2019-03-25-180911


Note You need to log in before you can comment on or make changes to this bug.