Bug 1362331

Summary: Container dashboard does not show 'Aggregated Node Utilization' unless appliance timezone is UTC
Product: Red Hat CloudForms Management Engine Reporter: George Goh <george.goh>
Component: UI - OPSAssignee: Yaacov Zamir <yzamir>
Status: CLOSED CURRENTRELEASE QA Contact: Einat Pacifici <epacific>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: bazulay, cpelland, dron, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container:dashboard
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1364061 (view as bug list) Environment:
Last Closed: 2017-01-11 20:03:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1364061    

Description George Goh 2016-08-02 01:25:57 UTC
Description of problem:

With OpenShift connected as a provider and timezone set to anything other than 'UTC', the container dashboard shows 'No data available' for the following components:

a. Aggregated Node Utilization
b. Network Utilization Trend
c. New Image Usage Trend
d. Pod Creation and Deletion Trends

Note: OSE nodes are set to SGT timezone, as well as the CF appliance.

Output of `date` shows:

[root@cloudforms ~]# date
Tue Aug  2 09:21:03 SGT 2016

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

How reproducible:
Whenever TZ is not set to UTC.

Steps to Reproduce:
In the UI
1. Settings -> Configuration, set Appliance Time Zone to '(GMT +08:00) SGT'
2. Compute -> Containers -> Overview

Actual results:

The container dashboard shows 'No data available' for the following components:

a. Aggregated Node Utilization
b. Network Utilization Trend
c. New Image Usage Trend
d. Pod Creation and Deletion Trends

Expected results:

the container dashboard shows actual usage data for the following components:

a. Aggregated Node Utilization
b. Network Utilization Trend
c. New Image Usage Trend
d. Pod Creation and Deletion Trends

Additional info:

If you switch back to UTC timezone using the following steps, the utilization and trend graphs come back:

In the UI
1. Settings -> Configuration, set Appliance Time Zone to '(GMT +00:00) UTC'
2. Compute -> Containers -> Overview

Comment 2 Yaacov Zamir 2016-08-03 08:01:59 UTC
Submitted upstream:
https://github.com/ManageIQ/manageiq/pull/10216

Comment 3 CFME Bot 2016-08-04 21:15:58 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4ed4c327b31807ef2feb9acc13f8a3b1dacfffc8

commit 4ed4c327b31807ef2feb9acc13f8a3b1dacfffc8
Author:     Yaacov Zamir <yzamir>
AuthorDate: Wed Aug 3 10:51:03 2016 +0300
Commit:     Yaacov Zamir <yzamir>
CommitDate: Thu Aug 4 17:37:52 2016 +0300

    Container dashboard does not show 'Aggregated Node Utilization' unless appliance timezone is UTC
    
    In the class MetricsRollup the column :time_profile is always utc, quering for a diferent time_profile will
    always give no results.
    We need to query the metrics table with time_profile == nil even if the user interface use different time_profile.
    
    Bugzilla:
    https://bugzilla.redhat.com/show_bug.cgi?id=1362331

 app/services/container_dashboard_service.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comment 4 Yaacov Zamir 2016-08-07 07:06:22 UTC
merged:
https://github.com/ManageIQ/manageiq/pull/10216

Comment 5 Tony 2016-11-08 08:34:05 UTC
Verified on CFME 5.7.0.9-beta2.1