Bug 1274679 - [userinterface_public_525]Number indicating used cpu/memroy is incorrect if client's time is ahead of the server's time.
Summary: [userinterface_public_525]Number indicating used cpu/memroy is incorrect if c...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-23 10:52 UTC by Yanping Zhang
Modified: 2015-11-23 21:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:18:50 UTC
Target Upstream Version:


Attachments (Terms of Use)
incorrent-number (102.72 KB, image/tiff)
2015-10-23 10:53 UTC, Yanping Zhang
no flags Details
30minutes (52.38 KB, image/png)
2015-10-26 08:03 UTC, Yanping Zhang
no flags Details
1hour (66.69 KB, image/png)
2015-10-26 08:04 UTC, Yanping Zhang
no flags Details
4hours (55.10 KB, image/png)
2015-10-26 08:04 UTC, Yanping Zhang
no flags Details

Description Yanping Zhang 2015-10-23 10:52:36 UTC
Description of problem:
If local time on client host is ahead of the time on server host, such as client time is 17:46, and server time is 17.44, View pod's metrics on browser(Firefox/Chrome/Safari), the number in the circle icon of metrics chart is incorrect, it's always 0 or a negative number. And "Available number" would changed accordingly.

Version-Release number of selected component (if applicable):
openshift v1.0.6-880-g5f33e54
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

How reproducible:
Always

Steps to Reproduce:
1.Create pod with cpu/memory request/limits set.
$oc create -f origin/examples/project-quota/application-template-with-resources.json -n pro1
$oc new-app ruby-helloworld-sample-with-resources -n pro1
2.On host whose local time is ahead of server time.View pod's metrics on browser.
3.

Actual results:
2.the number in the circle icon of metrics chart is incorrect, it's always 0 or a negative number. And "Available number" would changed accordingly. Pls refer to the attachment.

Expected results:
2.Number should be correct.

Additional info:

Comment 1 Yanping Zhang 2015-10-23 10:53:48 UTC
Created attachment 1085812 [details]
incorrent-number

Comment 2 Samuel Padgett 2015-10-23 12:23:15 UTC
https://github.com/openshift/origin/pull/5356

Comment 3 Samuel Padgett 2015-10-23 18:02:18 UTC
(In reply to Samuel Padgett from comment #2)
> https://github.com/openshift/origin/pull/5356

Please try with this fix.

Comment 4 Yanping Zhang 2015-10-26 08:02:43 UTC
Tested with latest origin code containing the pr5356.
openshift v1.0.6-946-g5954394
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

When client host local time is ahead of the time on server host, view the pod's metrics.
1.Choose Time Range"last 30 minutes".
The used memory/cpu would always show number 0, but from chart it exactly consumed memory/cpu.S o the number in the circle icon has less meaning to reflect the usage.
Most of the time, it has the same result when choose Time Range "Last hour".
2.Choose Time Range "Last 4 hours".
It would show the used memory number, not 0 now, but the available number is still the total number.
Pls refer to the attachment.

Comment 5 Yanping Zhang 2015-10-26 08:03:29 UTC
Created attachment 1086405 [details]
30minutes

Comment 6 Yanping Zhang 2015-10-26 08:04:17 UTC
Created attachment 1086406 [details]
1hour

Comment 7 Yanping Zhang 2015-10-26 08:04:48 UTC
Created attachment 1086407 [details]
4hours

Comment 8 Samuel Padgett 2015-10-26 12:59:30 UTC
The fix is working as intended -- we no longer show negative values for CPU usage when there are gaps in the data -- but I understand why this is still a problem.

It's difficult to know whether there is a clock skew or just no data because the container or Hawkular is stopped. Let me see if there is a way to use server time for the chart.

Comment 9 Samuel Padgett 2015-10-26 13:18:49 UTC
Related to https://github.com/openshift/origin/issues/2568

Comment 10 Samuel Padgett 2015-10-26 18:17:20 UTC
https://github.com/openshift/origin/pull/5402

Comment 11 Yanping Zhang 2015-10-27 04:31:53 UTC
Will test after pr5402 is merged.

Comment 12 Samuel Padgett 2015-10-27 17:02:18 UTC
(In reply to Yanping Zhang from comment #11)
> Will test after pr5402 is merged.

Thanks, the fix just merged in origin.

Comment 13 Yanping Zhang 2015-10-28 06:34:16 UTC
Tested on latest origin code.
openshift v1.0.6-997-gff3b522
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

There is still issue that available number is not matched with used number when choose different Time Range.

Since the original issue has been fixed, so move the bug to Verified, and file another bug to track the latter issue. https://bugzilla.redhat.com/show_bug.cgi?id=1275918


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