Bug 1243695 - "Time Zone" (under Chargeback Interval section) in chargeback report is not functioning
Summary: "Time Zone" (under Chargeback Interval section) in chargeback report is not f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.4.0
Hardware: x86_64
OS: Linux
medium
urgent
Target Milestone: GA
: 5.5.0
Assignee: Gregg Tanzillo
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-16 06:22 UTC by Prasad Mukhedkar
Modified: 2019-08-15 04:53 UTC (History)
12 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Previously, the chargeback report editor did not save the time zone selected in the Chargeback Interval field. This error in the chargeback report editor has been fixed, and a local time zone can now be saved in reports.
Clone Of:
Environment:
Last Closed: 2015-12-08 13:22:42 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Chargeback filter set to sydney timezone (170.45 KB, image/png)
2015-08-27 01:59 UTC, Prasad Mukhedkar
no flags Details
CFME 5.4 patched Chargeback report (281.14 KB, image/png)
2015-08-27 02:00 UTC, Prasad Mukhedkar
no flags Details
CFME 5.4 unpatched Chargeback report (273.79 KB, image/png)
2015-08-27 02:04 UTC, Prasad Mukhedkar
no flags Details
Discrepancies on the Total Cost reports between CFME 5.3 and CFME 5.4 (example Virtual Machine "acmeesg01-0", "cperez-test-recon-01", "demolin01" for the date of 8/25/2015) (309.98 KB, image/png)
2015-08-27 02:06 UTC, Prasad Mukhedkar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Prasad Mukhedkar 2015-07-16 06:22:36 UTC
Description of problem:

Cloudforms is using UTC in calculating chargeback eventhough a local timezone was already set in the Reports Chargeback Interval.

Here's a sample screenshot taken @July 16 9:36 am Sydney Time(July 15 11:36pm UTC) sample_chargeback_report.png

Sample chargeback report generated @July 16 9:36am EST for an hourly reporting  range from yesterday to  today-partial but only shows the previous day 

report_hourly_timezone.png (Report's chargeback interval settings)

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

How reproducible:
always 

Steps to Reproduce:
1. Create chargeback rates and attach to a provider/vms
2. Create a chargeback report, in filtering section use local TimeZone as Chargeback Interval  
3. queue report 

Actual results:
chargeback report use UTC timezone as interval 

Expected results:
should use local timezone interval 

Additional info:

Comment 2 Dave Johnson 2015-07-17 14:00:52 UTC
Nandini, can you please try to retest this, thanks!

Comment 3 Prasad Mukhedkar 2015-07-28 15:29:45 UTC
Nandini did you get chance to reproduce this, Let me know if you need any
additional information on this.

Comment 4 Nandini Chandra 2015-08-03 18:18:48 UTC
I could reproduce the issue on a 5.3 appliance.I haven't had a chance to reproduce it on a 5.4 appliance.

Reproducer steps:
1)I set the appliance Time Zone to non-UTC(Australian Eastern Time)
2)Created a Time Profile for Australian Eastern Time.
3)In chargeback interval,I selected the following options:
Daily ending with - Today(Partial)
Going back - 1 day
4)I then generated a chargeback report at 4:08 Australian Eastern Time on 8/4/15,which is 18:08 UTC on 8/3/15.The report doesn't contain data for 8/4/15.

Comment 10 Gregg Tanzillo 2015-08-18 13:11:23 UTC
Yes, I have looked into it and discovered that the bug is actually in the chargeback report editor. When a user selects a time zone on the filter tab and clicks the save button the selected time zone was never saved in the report. I verified that once a time zone (other than UTC, which is the default) is saved in the report it is honored when the report is generated.

I've created a PR for this - https://github.com/ManageIQ/manageiq/pull/3909

Comment 14 CFME Bot 2015-08-19 21:18:20 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e

commit 9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 17:58:26 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 17:58:26 2015 -0400

    Fixed bug where time zone selected in report editor was not getting saved with report.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 app/controllers/report_controller/reports/editor.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 15 CFME Bot 2015-08-19 21:18:23 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4775b1030b0b52caee3c41b22b630b8d9838f316

commit 4775b1030b0b52caee3c41b22b630b8d9838f316
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 23:42:36 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 23:42:36 2015 -0400

    Added test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 .../miq_report_controller/reports/editor_spec.rb   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comment 16 CFME Bot 2015-08-19 22:07:58 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e

commit 9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 17:58:26 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 17:58:26 2015 -0400

    Fixed bug where time zone selected in report editor was not getting saved with report.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 app/controllers/report_controller/reports/editor.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 17 CFME Bot 2015-08-19 22:08:01 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4775b1030b0b52caee3c41b22b630b8d9838f316

commit 4775b1030b0b52caee3c41b22b630b8d9838f316
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 23:42:36 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 23:42:36 2015 -0400

    Added test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 .../miq_report_controller/reports/editor_spec.rb   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comment 18 CFME Bot 2015-08-19 22:28:26 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e

commit 9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 17:58:26 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 17:58:26 2015 -0400

    Fixed bug where time zone selected in report editor was not getting saved with report.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 app/controllers/report_controller/reports/editor.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 19 CFME Bot 2015-08-19 22:28:29 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4775b1030b0b52caee3c41b22b630b8d9838f316

commit 4775b1030b0b52caee3c41b22b630b8d9838f316
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 23:42:36 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 23:42:36 2015 -0400

    Added test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 .../miq_report_controller/reports/editor_spec.rb   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comment 20 CFME Bot 2015-08-19 23:02:26 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e

commit 9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 17:58:26 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 17:58:26 2015 -0400

    Fixed bug where time zone selected in report editor was not getting saved with report.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 app/controllers/report_controller/reports/editor.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 21 CFME Bot 2015-08-19 23:02:29 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4775b1030b0b52caee3c41b22b630b8d9838f316

commit 4775b1030b0b52caee3c41b22b630b8d9838f316
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 23:42:36 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 23:42:36 2015 -0400

    Added test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 .../miq_report_controller/reports/editor_spec.rb   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comment 22 CFME Bot 2015-08-20 00:32:03 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e

commit 9ab16c4c7d4c7a3bd9ba1b98a10b6f16b047ed5e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 17:58:26 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 17:58:26 2015 -0400

    Fixed bug where time zone selected in report editor was not getting saved with report.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 app/controllers/report_controller/reports/editor.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 23 CFME Bot 2015-08-20 00:32:07 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4775b1030b0b52caee3c41b22b630b8d9838f316

commit 4775b1030b0b52caee3c41b22b630b8d9838f316
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Mon Aug 17 23:42:36 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Aug 17 23:42:36 2015 -0400

    Added test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1243695

 .../miq_report_controller/reports/editor_spec.rb   | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comment 25 Prasad Mukhedkar 2015-08-27 01:59:19 UTC
Created attachment 1067477 [details]
Chargeback filter set to sydney timezone

Comment 26 Prasad Mukhedkar 2015-08-27 02:00:46 UTC
Created attachment 1067478 [details]
CFME 5.4 patched Chargeback report

Comment 27 Prasad Mukhedkar 2015-08-27 02:04:38 UTC
Created attachment 1067479 [details]
CFME 5.4 unpatched Chargeback report

Comment 28 Prasad Mukhedkar 2015-08-27 02:06:14 UTC
Created attachment 1067480 [details]
Discrepancies on the Total Cost reports between CFME 5.3 and CFME 5.4  (example Virtual Machine "acmeesg01-0", "cperez-test-recon-01", "demolin01" for the date of 8/25/2015)

Comment 33 Gregg Tanzillo 2015-11-16 15:13:27 UTC
Hi, any update on this one? Can we close it? As far as I can tell the provided hotfix addresses the reported issue. Thanks.

Comment 34 Milan Falešník 2015-11-20 12:27:23 UTC
Hello, I have been looking at this in 5.5.0.11, and if I specify some timezone in the report configuration (eg. Eastern US time) and the appliance is in UTC, the times in the web report and also in the downloaded report are still shown as UTC. I did exactly what Nandini and Prasad did ... or not? Any more details?

Comment 35 Gregg Tanzillo 2015-12-02 17:24:11 UTC
Hi Milan,

Are you referring to the chargeback report mentioned in the original bug? I don't see any columns on that report, or any chargeback report, that have a time. Only the date range column, but that does not have a time element.

With that, the time zone configured in a chargeback report is only for grouping the metrics by day, week or month. It users the time zone to determine when a day, week or month starts in that time zone so that the metrics can be grouped accordingly.Hope this helps.

Gregg

Comment 36 Milan Falešník 2015-12-04 08:38:12 UTC
Yes, I can see that now. Checked in 5.5.0.13

Comment 38 errata-xmlrpc 2015-12-08 13:22:42 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/RHSA-2015:2551


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