Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1427360 - Web console pod metrics graph no rendering for 0 CPU usage
Web console pod metrics graph no rendering for 0 CPU usage
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console (Show other bugs)
3.4.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Samuel Padgett
Yadan Pei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-27 20:32 EST by Takayoshi Kimura
Modified: 2017-07-24 10 EDT (History)
8 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-12 15:14:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description Takayoshi Kimura 2017-02-27 20:32:46 EST
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 11:04:27 EST
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-02-28 19:37:00 EST
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 09:13:22 EST
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 09:15:22 EST
@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 09:56:42 EST
@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 10:05:13 EST
I see the problem. This is a web console bug.
Comment 7 Samuel Padgett 2017-03-01 10:23:17 EST
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 12:57:50 EST
This has been merged into ocp and is in OCP v3.5.0.38 or newer.
Comment 11 Yanping Zhang 2017-03-06 06:01:17 EST
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 08:12:17 EST
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 08:13 EST
Created attachment 1260404 [details]
metrics-3.4
Comment 14 Yanping Zhang 2017-03-06 08:15 EST
Created attachment 1260405 [details]
metrics-3.5-one
Comment 15 Yanping Zhang 2017-03-06 08:15 EST
Created attachment 1260406 [details]
metrics-3.5-two
Comment 16 Yanping Zhang 2017-03-06 08:17:04 EST
The OCP 3.5 version I checked is v3.5.0.39
Comment 17 Samuel Padgett 2017-03-06 08:17:24 EST
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 00:58:18 EST
According to Comment12 and Comment17, the bug has been fixed, so move it to Verified.
Comment 19 Xingxing Xia 2017-03-07 02:07:55 EST
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 08:38:01 EST
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 15:14:01 EDT
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.