Bug 1427360 - Web console pod metrics graph no rendering for 0 CPU usage
Summary: Web console pod metrics graph no rendering for 0 CPU usage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-28 01:32 UTC by Takayoshi Kimura
Modified: 2020-04-15 15:22 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The web console was incorrectly showing 0 values for CPU usage as gaps in its metrics charts. The issue has been fixed. The web console now correctly shows 0 values and only shows gaps when there is no data.
Clone Of:
Environment:
Last Closed: 2017-04-12 19:14:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of the metrics inconsistent CPU rendering (73.82 KB, image/png)
2017-02-28 01:32 UTC, Takayoshi Kimura
no flags Details
metrics-3.4 (72.77 KB, image/png)
2017-03-06 13:13 UTC, Yanping Zhang
no flags Details
metrics-3.5-one (45.50 KB, image/png)
2017-03-06 13:15 UTC, Yanping Zhang
no flags Details
metrics-3.5-two (50.33 KB, image/png)
2017-03-06 13:15 UTC, Yanping Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Takayoshi Kimura 2017-02-28 01:32:46 UTC
Created attachment 1258244 [details]
Screenshot of the metrics inconsistent CPU rendering

Description of problem:

On Web console pod metrics graph, if there is no CPU usage at given data point, the graph shows noting. For network we can see 0 is rendered so this is not a consistent behavior. 

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

atomic-openshift-3.4.1.7-1.git.0.81b9a4a.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Open pod metrics graph on web console
2. Generate some load to the pod and stop the load
3. Monitor pod metrics graph. 0 CPU is not rendered

Actual results:

0 CPU usage is not rendered, no on-mouse popup at the 0 CPU usage data point

Expected results:

0 CPU usage is rendered as 0 CPU usage, on-mouse popup at the data point like network metrics

Additional info:

Comment 1 Matt Wringe 2017-02-28 16:04:27 UTC
Are you sure that the data point should be 0 or if there is no data point for that location?

Can you inspect into the browser and get the network result being returned by Hawkular Metrics? To see if this is a problem with rendering in the console or a problem where the data does not exist in Hawkular Metrics

Comment 2 Takayoshi Kimura 2017-03-01 00:37:00 UTC
Yes it should be 0, I already attached screenshot including "CPU 0 network 0 usage data point". As we can see in the screenshot, the network graph goes down to 0 value but the CPU is just not rendered.

I think this is web console graph rendering issue, not a Metrics data issue.

Comment 3 Matt Wringe 2017-03-01 14:13:22 UTC
The console gets a list of values from Hawkular Metrics and uses those to populate the graph. It can either return a value or specify that there is no data entry for that particular segment.

If there is no entry for that particular segment, then what the console is doing is correct. It has no information available to it, so it can't graph anything. The value at the point is unknown and setting it to 0 would be incorrect

On the other hand, it could be that the console is considering a 0 value for the CPU to mean that there is no information available for that segment. Which would be incorrect as well.

@tkimura the screenshot itself does not let us know what exactly is happening here, which is why I requested additional information.

Comment 4 Matt Wringe 2017-03-01 14:15:22 UTC
@spadgett: do you know if the console is considering a 0 value for CPU to mean there is no information and so there is nothing graphed for that segment? Or is it properly looking at the empty=true attribute that Hawkular returns?

Comment 5 Samuel Padgett 2017-03-01 14:56:42 UTC
@mwringe We should be differentiating between null and 0 values, but I'll investigate further. We're not looking specifically at `empty`, however.

https://github.com/spadgett/origin-web-console/blob/15ba89f164629cecc51a48721b805eaf3631695f/app/scripts/services/metricsCharts.js#L6-L9

Comment 6 Samuel Padgett 2017-03-01 15:05:13 UTC
I see the problem. This is a web console bug.

Comment 7 Samuel Padgett 2017-03-01 15:23:17 UTC
PR for master branch:

https://github.com/openshift/origin-web-console/pull/1312

PR for enterprise-3.5:

https://github.com/openshift/origin-web-console/pull/1313

Comment 9 Troy Dawson 2017-03-03 17:57:50 UTC
This has been merged into ocp and is in OCP v3.5.0.38 or newer.

Comment 11 Yanping Zhang 2017-03-06 11:01:17 UTC
I'm trying to reproduce the bug on OCP 3.4 and check the fix on OCP 3.5. Unfortunately, my env broke before I finished the checking, I will continue to test the bug tomorrow.

Comment 12 Yanping Zhang 2017-03-06 13:12:17 UTC
Checked on OCP 3.4, when value is 0, there is no line indicating the value, it's gaps between 0 with other value, refer to attachment "metrics-3.4".
Checked on OCP 3.5, when value is 0, there is line indicating the value, and the chart would rise up from 0 to other value or drop down to 0 with line. But there is a small gap without line before/after the valley bottom, refer to attachments "metrics-3.5-one" and "metrics-3.5-two". Is the gap normal?

Comment 13 Yanping Zhang 2017-03-06 13:13:37 UTC
Created attachment 1260404 [details]
metrics-3.4

Comment 14 Yanping Zhang 2017-03-06 13:15:16 UTC
Created attachment 1260405 [details]
metrics-3.5-one

Comment 15 Yanping Zhang 2017-03-06 13:15:55 UTC
Created attachment 1260406 [details]
metrics-3.5-two

Comment 16 Yanping Zhang 2017-03-06 13:17:04 UTC
The OCP 3.5 version I checked is v3.5.0.39

Comment 17 Samuel Padgett 2017-03-06 13:17:24 UTC
You're seeing this bug, which is an unrelated side effect of using a spline chart:

https://bugzilla.redhat.com/show_bug.cgi?id=1375676

Comment 18 Yanping Zhang 2017-03-07 05:58:18 UTC
According to Comment12 and Comment17, the bug has been fixed, so move it to Verified.

Comment 19 Xingxing Xia 2017-03-07 07:07:55 UTC
Another minor display issue about unit. The unit preciseness is not consistent in one Y-axis. E.g. in comment 16's attachment, CPU preciseness is 4-digit decimal .0001, but it also displays 3-digit decimal .001. Is it intended or is consistent preciseness better?

Comment 20 Samuel Padgett 2017-03-07 13:38:01 UTC
This seems to be the c3.js default for tick formatting. I think it's reasonable. When we start changing the format of the ticks, it is easy to run into bugs where some ticks get cut off because there's not enough space or tick values appear to be repeated because we haven't given enough precision. I've found that we typically get the best results letting the charting library choose the values and format them.

Comment 22 errata-xmlrpc 2017-04-12 19:14: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, 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-2017:0884


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