Bug 1327322

Summary: [Bug] Optimize: Utilization by Classification Throws Exception
Product: Red Hat CloudForms Management Engine Reporter: Dustin Scott <dscott>
Component: ReportingAssignee: Šimon Lukašík <slukasik>
Status: CLOSED CURRENTRELEASE QA Contact: Oleksii Tsuman <otsuman>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: cpelland, jhardy, jkrocil, nachandr, obarenbo, psavage, simaishi, slukasik
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: retest:optimize
Fixed In Version: 5.7.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1346036 (view as bug list) Environment:
Last Closed: 2017-01-11 19:53:11 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:
Bug Depends On:    
Bug Blocks: 1346036    

Description Dustin Scott 2016-04-14 19:00:44 UTC
Description of problem:

When selecting a Classification under Optimize > Utilization > CFME Region: Region [Region Number], CloudForms throw an exception with the following results:

Error text:

undefined method `report_results' for nil:NilClass [miq_capacity/util_chart_chooser]


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

CFME 4.0 Build 5.5.2.4.20160127105142_395c086


How reproducible:

100% Reproducible


Steps to Reproduce:
1. Login as Administrator
2. Navigate to Optimize > Utilization > CFME Region: Region [Region Number] 
3. Select the desired Classification

Actual results:

Error text:

undefined method `report_results' for nil:NilClass [miq_capacity/util_chart_chooser]


Expected results:

Optimize displays utilization based on tag classification selected.


Additional info:

Provider is OpenStack (RHEL OSP7) and the classifications we are trying to filter on are applied to the provider only.  Customer has very short lifetimes on their instances (less than a week) so not much data is available as well.

Comment 3 Šimon Lukašík 2016-04-27 11:44:17 UTC
Reproducible on upstream. Taking.

Comment 5 Nandini Chandra 2016-05-06 17:18:36 UTC
Clearing NEEDINFO

Comment 7 CFME Bot 2016-06-13 18:27:55 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9cbe28be025c24104411658315f43f956ed95f50

commit 9cbe28be025c24104411658315f43f956ed95f50
Author:     Šimon Lukašík <isimluk>
AuthorDate: Wed Apr 27 14:48:00 2016 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Thu May 12 10:24:17 2016 +0200

    Notify user when utilization report failed to build
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1327322

 app/controllers/application_controller/performance.rb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comment 8 CFME Bot 2016-06-13 18:28:00 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/cd8301e170fc8b02a2874545fa3b9386f3bad5f5

commit cd8301e170fc8b02a2874545fa3b9386f3bad5f5
Author:     Šimon Lukašík <isimluk>
AuthorDate: Thu May 12 13:50:27 2016 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Thu May 12 14:10:04 2016 +0200

    Do not pass virtual_attribute to MetricRollup.new
    
    The v_derived_storage_used is virtual in metrics. We should not
    instantiate MetricRollup with this attribute even though it is part of
    some of the metrics.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1327322
    Fixes: #1357
    
    Addressing:
    can't write unknown attribute `v_derived_storage_used`  Method:[rescue in deliver]
    [...]
    app/models/vim_performance_analysis.rb:554:in `block in group_perf_by_timestamp'
    app/models/vim_performance_analysis.rb:545:in `each' app/models/vim_performance_analysis.rb:545:in `inject'
    app/models/vim_performance_analysis.rb:545:in `group_perf_by_timestamp'
    app/models/miq_report/generator/utilization.rb:23:in `build_results_for_report_utilization'

 app/models/vim_performance_analysis.rb       |  1 +
 spec/models/vim_performance_analysis_spec.rb | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

Comment 11 Nandini Chandra 2016-11-10 20:49:53 UTC
Verified in 5.7.0.9

Comment 14 Nandini Chandra 2018-03-01 14:47:17 UTC
Assigning to Oleksii Tsuman for acking/nacking test_qe_coverage falg.