Bug 1274679 - [userinterface_public_525]Number indicating used cpu/memroy is incorrect if client's time is ahead of the server's time.
[userinterface_public_525]Number indicating used cpu/memroy is incorrect if c...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Management Console (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Samuel Padgett
Yanping Zhang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-23 06:52 EDT by Yanping Zhang
Modified: 2015-11-23 16:18 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:18:50 EST
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)
incorrent-number (102.72 KB, image/tiff)
2015-10-23 06:53 EDT, Yanping Zhang
no flags Details
30minutes (52.38 KB, image/png)
2015-10-26 04:03 EDT, Yanping Zhang
no flags Details
1hour (66.69 KB, image/png)
2015-10-26 04:04 EDT, Yanping Zhang
no flags Details
4hours (55.10 KB, image/png)
2015-10-26 04:04 EDT, Yanping Zhang
no flags Details

  None (edit)
Description Yanping Zhang 2015-10-23 06:52:36 EDT
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 06:53 EDT
Created attachment 1085812 [details]
incorrent-number
Comment 2 Samuel Padgett 2015-10-23 08:23:15 EDT
https://github.com/openshift/origin/pull/5356
Comment 3 Samuel Padgett 2015-10-23 14:02:18 EDT
(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 04:02:43 EDT
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 04:03 EDT
Created attachment 1086405 [details]
30minutes
Comment 6 Yanping Zhang 2015-10-26 04:04 EDT
Created attachment 1086406 [details]
1hour
Comment 7 Yanping Zhang 2015-10-26 04:04 EDT
Created attachment 1086407 [details]
4hours
Comment 8 Samuel Padgett 2015-10-26 08:59:30 EDT
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 09:18:49 EDT
Related to https://github.com/openshift/origin/issues/2568
Comment 10 Samuel Padgett 2015-10-26 14:17:20 EDT
https://github.com/openshift/origin/pull/5402
Comment 11 Yanping Zhang 2015-10-27 00:31:53 EDT
Will test after pr5402 is merged.
Comment 12 Samuel Padgett 2015-10-27 13:02:18 EDT
(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 02:34:16 EDT
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.