Bug 1348879 - [RFE] Add an option to enable/disable fetching historical performance data when C&U for RHEV provider
Summary: [RFE] Add an option to enable/disable fetching historical performance data wh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.7.0
Assignee: Boriso
QA Contact: Nandini Chandra
URL:
Whiteboard: c&u:rhevm
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-22 09:06 UTC by Nandini Chandra
Modified: 2017-04-28 14:57 UTC (History)
5 users (show)

Fixed In Version: 5.7.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-04 12:56:08 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0012 0 normal SHIPPED_LIVE CFME 5.7.0 bug fixes and enhancement update 2017-01-04 17:50:36 UTC

Description Nandini Chandra 2016-06-22 09:06:49 UTC
Description of problem:
-----------------------
When C&U is enabled for a RHEV provider, CFME fetches some historical performance data instead of fetching data for the current hour only.

For vSphere, CFME fetches performance data for the current hour only.

On my appliance managing a RHEVM and a vSphere provider, the providers were added on 2016-06-14 and C&U collection was enabled for both the providers soon providers were added.

Query for RHEVM
---------------
vmdb_production=# select cpu_usagemhz_rate_average,timestamp from metric_rollups where resource_name = 'cu-24x7' and parent_ems_id = 1\x\g\x
-[ RECORD 8 ]-------------+--------------------
cpu_usagemhz_rate_average | 565.394773333334
timestamp                 | 2016-06-11 12:00:00
-[ RECORD 9 ]-------------+--------------------
cpu_usagemhz_rate_average | 638.008062569832
timestamp                 | 2016-06-11 13:00:00

Note that the metric_rollups table contains records for 2016-06-11 also.

Query for vsphere
-----------------
vmdb_production=# select cpu_usagemhz_rate_average,timestamp from metric_rollups where resource_name = 'cu-24x7' and parent_ems_id = 1\x\g\x
Expanded display is on.
-[ RECORD 1 ]-------------+--------------------
cpu_usagemhz_rate_average | 
timestamp                 | 2016-06-14 09:00:00
-[ RECORD 2 ]-------------+--------------------
cpu_usagemhz_rate_average | 111.380434782609
timestamp                 | 2016-06-14 04:00:00
-[ RECORD 3 ]-------------+--------------------
cpu_usagemhz_rate_average | 111.772222222222
timestamp                 | 2016-06-14 05:00:00
-[ RECORD 4 ]-------------+--------------------
cpu_usagemhz_rate_average | 111.583333333333
timestamp                 | 2016-06-14 06:00:00
-[ RECORD 5 ]-------------+--------------------
cpu_usagemhz_rate_average | 111.705555555556
timestamp                 | 2016-06-14 07:00:00
-[ RECORD 6 ]-------------+--------------------
cpu_usagemhz_rate_average | 110.201219512195
timestamp                 | 2016-06-14 08:00:00


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


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


Steps to Reproduce:
-------------------
1.Manage a RHEVM provider.
2.Enable C&U collection for the provider.


Actual results:
---------------
CFME fetches some historical performance data instead of performance data for the current hour when C&U is enabled  for RHEV provider.


Expected results:
-----------------
CFME should fetch C&U data for the current hour only.


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

Comment 5 CFME Bot 2016-09-08 14:15:53 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/e3e19a9660ed8db07f34a6ad7b669343e7e79cd3

commit e3e19a9660ed8db07f34a6ad7b669343e7e79cd3
Author:     borod108 <bodnopoz>
AuthorDate: Sun Aug 28 15:24:18 2016 +0300
Commit:     borod108 <bodnopoz>
CommitDate: Tue Aug 30 10:18:42 2016 +0300

    Change the range of captured metric data on initialization
    
    Captured metric data on RHV will now follow the setting of "initial_capture_days"
    and not capture 7 days back by default on initialization.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1357003
    https://bugzilla.redhat.com/show_bug.cgi?id=1348879

 .../providers/redhat/infra_manager/metrics_capture.rb    |  2 +-
 spec/factories/authentication.rb                         |  4 ++++
 spec/factories/ext_management_system.rb                  |  7 +++++++
 .../redhat/infra_manager/metrics_capture_spec.rb         | 16 ++++++++++++++++
 4 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 spec/models/manageiq/providers/redhat/infra_manager/metrics_capture_spec.rb

Comment 7 Nandini Chandra 2016-10-27 22:45:37 UTC
verified in 5.7.0.7

Comment 9 errata-xmlrpc 2017-01-04 12:56:08 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://rhn.redhat.com/errata/RHBA-2017-0012.html


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