Bug 1230786 - UI : Multiple daily records on C&U charts with time profiles that have C&U data roll up enabled
Summary: UI : Multiple daily records on C&U charts with time profiles that have C&U da...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.5.0
Assignee: Gregg Tanzillo
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On:
Blocks: 1252582
TreeView+ depends on / blocked
 
Reported: 2015-06-11 14:25 UTC by Nandini Chandra
Modified: 2015-12-08 13:13 UTC (History)
7 users (show)

Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1252582 (view as bug list)
Environment:
Last Closed: 2015-12-08 13:13:22 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of C&U charts with multiple daily records (65.88 KB, image/png)
2015-06-11 14:25 UTC, Nandini Chandra
no flags Details
screenshot of C&U graph (77.55 KB, image/png)
2015-06-12 05:57 UTC, Nandini Chandra
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 Nandini Chandra 2015-06-11 14:25:06 UTC
Created attachment 1037727 [details]
screenshot of C&U charts with multiple daily records

Description of problem:
-------------------------


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


How reproducible:
-----------------
Always


Steps to Reproduce:
------------------
1.Enable C&U collection
2.Create mutliple time profiles,enable C&U data roll up for the time profiles
3.View C&U daily charts for VMs,hosts etc.While viewing the C&U charts,select any of the time profiles for which C&U data roll up is enabled.


Actual results:
----------------
The charts contain multiple daily data records instead of a single record.

The attached screenshot shows 3 records for every day since C&U collection was started.This is from an appliance with 3 time profiles for which C&U data roll up has been enabled.


Expected results:
----------------
The charts should contain single daily record.


Additional info:
----------------

Comment 2 Nandini Chandra 2015-06-12 05:57:48 UTC
Created attachment 1037915 [details]
screenshot of C&U graph

Comment 3 Nandini Chandra 2015-06-12 06:06:03 UTC
It's my understanding that the rollup code creates a data point per user with a unique timezone.

I checked the metrics rollup table and there are 3 records for the 3 different time profiles on my appliance.Does that mean everything is okay with the backend?

vmdb_production=# select timestamp, created_on from metric_rollups_06 where resource_id = 201 and capture_interval_name = 'daily'\x\g\x

timestamp  | 2015-06-09 00:00:00
created_on | 2015-06-10 00:01:47.353607
-[ RECORD 9 ]--------------------------
timestamp  | 2015-06-09 00:00:00
created_on | 2015-06-10 00:01:47.294415
-[ RECORD 10 ]-------------------------
timestamp  | 2015-06-09 04:00:00
created_on | 2015-06-10 04:01:43.417271
-[ RECORD 11 ]-------------------------
timestamp  | 2015-06-10 00:00:00
created_on | 2015-06-11 00:03:33.835257
-[ RECORD 12 ]-------------------------
timestamp  | 2015-06-10 00:00:00
created_on | 2015-06-11 00:03:33.478702
-[ RECORD 13 ]-------------------------
timestamp  | 2015-06-10 04:00:00
created_on | 2015-06-11 04:01:54.494068
-[ RECORD 14 ]-------------------------
timestamp  | 2015-06-11 00:00:00
created_on | 2015-06-12 00:02:44.967826
-[ RECORD 15 ]-------------------------
timestamp  | 2015-06-11 00:00:00
created_on | 2015-06-12 00:02:45.112775
-[ RECORD 16 ]-------------------------
timestamp  | 2015-06-11 04:00:00
created_on | 2015-06-12 04:01:45.412357

Comment 4 Gregg Tanzillo 2015-07-29 16:36:49 UTC
Would it be possible to get an export of the DB that was used to recreate this bug? I've created a new DB and started collecting C&U but I need at least 2 days of collection in order to see daily data on reports. If you still have it, great. If not, I'll wait until I have enough data and hopefully recreate the bug. Thanks,

Comment 5 Gregg Tanzillo 2015-07-30 13:07:41 UTC
(In reply to Gregg Tanzillo from comment #4)
> Would it be possible to get an export of the DB that was used to recreate
> this bug? I've created a new DB and started collecting C&U but I need at
> least 2 days of collection in order to see daily data on reports. If you
> still have it, great. If not, I'll wait until I have enough data and
> hopefully recreate the bug. Thanks,

Don't worry about getting the DB. I was able to recreate with my local DB.

Comment 7 Nandini Chandra 2015-08-03 09:05:33 UTC
Resetting the NEEDINFO flag based on Gregg's comment 5

Comment 8 CFME Bot 2015-08-03 18:56:31 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=3b1c6250f57bc3f1dce260480b0de70af28e635c

commit 3b1c6250f57bc3f1dce260480b0de70af28e635c
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Thu Jul 30 08:23:01 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Thu Jul 30 15:59:30 2015 -0400

    Treat classes that have "derived" instances (instances_are_derived? => true) the same as classes that derive from ActsAsArModel and call custom find method. This was preventing the custom find method in VimPerformanceDaily from being called which caused time profiles to be ignored and return multiple rows for the same day when multiple time profiles exist.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1231069
    https://bugzilla.redhat.com/show_bug.cgi?id=1230786

 vmdb/app/models/rbac.rb                  | 2 +-
 vmdb/app/models/vim_performance_daily.rb | 2 ++
 vmdb/spec/models/rbac_spec.rb            | 7 +++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

Comment 9 CFME Bot 2015-08-03 18:56:38 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=95a733b9bca72866af6e0d1ac1d3084384d8c46a

commit 95a733b9bca72866af6e0d1ac1d3084384d8c46a
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Jul 31 16:50:04 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Fri Jul 31 16:50:04 2015 -0400

    Added tests for daily performance find with time profile, limit and offset.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1231069
    https://bugzilla.redhat.com/show_bug.cgi?id=1230786

 vmdb/spec/models/vim_performance_daily_spec.rb | 77 ++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 vmdb/spec/models/vim_performance_daily_spec.rb

Comment 10 CFME Bot 2015-08-03 18:56:46 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=67e3cbd9074acd96b9982e82f1908b769058d0ef

commit 67e3cbd9074acd96b9982e82f1908b769058d0ef
Merge: fa41d2f 9a94873
Author:     Dan Clarizio <dclarizi>
AuthorDate: Mon Aug 3 14:55:15 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Mon Aug 3 14:55:15 2015 -0400

    Merge branch 'fix-timelines-in-daily-cu' into '5.4.z'
    
    Fixes issue where timelines are ignored and multiple days from daily performance are displayed in C&U detailed reports.
    
    Treat classes that have "derived" instances (instances_are_derived? => true) the… same as classes that derive from ActsAsArModel and call custom find method. This was preventing the custom find method in VimPerformanceDaily from being called which caused time profiles to be ignored and return multiple rows for the same day when multiple time profiles exist.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1231069
    https://bugzilla.redhat.com/show_bug.cgi?id=1230786
    
    See merge request !205

 vmdb/app/models/rbac.rb                        |  2 +-
 vmdb/app/models/vim_performance_daily.rb       |  2 +
 vmdb/spec/models/rbac_spec.rb                  |  7 +++
 vmdb/spec/models/vim_performance_daily_spec.rb | 79 ++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 1 deletion(-)

Comment 11 CFME Bot 2015-08-03 18:56:54 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=9a9487320d7f01103d3b8ab8ce924e890aece311

commit 9a9487320d7f01103d3b8ab8ce924e890aece311
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Jul 31 17:05:06 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Fri Jul 31 17:05:06 2015 -0400

    Added explicit ordering in the test to ensure the expected result is in the correct sequece.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1231069
    https://bugzilla.redhat.com/show_bug.cgi?id=1230786

 vmdb/spec/models/vim_performance_daily_spec.rb | 2 ++
 1 file changed, 2 insertions(+)

Comment 12 CFME Bot 2015-08-03 18:57:01 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=70766d7650a7de235fd0dea88765098a07ef2f54

commit 70766d7650a7de235fd0dea88765098a07ef2f54
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Thu Jul 30 16:36:51 2015 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Thu Jul 30 16:38:15 2015 -0400

    Fixed incorrect call to limit on offset line.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1231069
    https://bugzilla.redhat.com/show_bug.cgi?id=1230786

 vmdb/app/models/vim_performance_daily.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 13 Nandini Chandra 2015-09-17 22:26:24 UTC
Verification blocked by

https://bugzilla.redhat.com/show_bug.cgi?id=1264218

Comment 14 Nandini Chandra 2015-10-13 21:03:49 UTC
Verified in 5.5.0.5

Comment 16 errata-xmlrpc 2015-12-08 13:13:22 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.