Description of problem: ------------------------ The fix for https://bugzilla.redhat.com/show_bug.cgi?id=1419186 was to get Chargeback reports to skip hourly rollups that are older than the VM itself. I did some investigation while verifying this BZ and found that CFME collects metrics for resources before resource creation. vm.metric_rollups.order(:timestamp).where(:capture_interval_name => 'hourly').first.timestamp => Mon, 13 Feb 2017 21:00:00 UTC +00:00 vm.created_on => Mon, 13 Feb 2017 22:02:53 UTC +00:00 BZ 1419186 affects versions > 5.6 only.So, the fix is relevant to CFME version > 5.6. In 5.6, Chargeback reports do not skip hourly rollups that are older than VMs. In 5.7, Chargeback reports skip hourly rollups that are older than VMs. Version-Release number of selected component (if applicable): -------------------------------------------------------------- 5.7.1.3 How reproducible: ----------------- Always Steps to Reproduce: ------------------- 1.Manage a provider.Enable C&U collection for the provider. Actual results: --------------- CFME collects C&U metrics even before resource creation. Expected results: ----------------- It's not necessary for CFME to collect C&U metrics before resource creation. Additional info: ----------------
I have been discussing this issue with Simon Lukasik.
Perhaps we can charge for it, since it is collected. This needs deeper look. How far to the history we collect on a first refresh?
*** Bug 1439034 has been marked as a duplicate of this bug. ***
https://github.com/ManageIQ/manageiq/pull/14666
Verified in 5.9.0.5. Verified that Chargeback reports don't skip records older than the VM itself and take into consideration all the records/C&U data fetched from the first collection. (in case VM was already existing when the provider was added).