Bug 1266270 - ERROR -- : [NoMethodError]: undefined method `self_service_user?' for nil:NilClass Method:[rescue in generate_one_content_for_group]
Summary: ERROR -- : [NoMethodError]: undefined method `self_service_user?' for nil:Nil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.4.0
Hardware: All
OS: All
unspecified
high
Target Milestone: GA
: 5.5.0
Assignee: Nick Carboni
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-24 23:39 UTC by Kevin Morey
Modified: 2015-12-08 13:33 UTC (History)
7 users (show)

Fixed In Version: 5.5.0.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:33:07 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
widget import (4.55 KB, text/x-vhdl)
2015-09-24 23:39 UTC, Kevin Morey
no flags Details
reports from 5.3.2 (7.05 KB, text/x-vhdl)
2015-09-30 14:15 UTC, Kevin Morey
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 Kevin Morey 2015-09-24 23:39:25 UTC
Created attachment 1076782 [details]
widget import

Description of problem:
When generating data for the attached widget an error is thrown in the evm.log. I have confirmed that this issues exists in both my environment and at a customers POC environment.

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


How reproducible:
100%


Steps to Reproduce:
1. Import attached widget yml 
2. tag some vms with 'environment' => 'prod'
3. The report will generate successfully but the widget errors each time. 
4. I am running the widget as Administrator and still it is abending.

Option 2 (I have it all ready to go for you):
1. log into 10.11.164.87 as admin
2. Navigate to Cloud Initelligent / Reports / Desktop Widgets
3. Locate the widget called "Chargeback - Production VMs (30 days)"
4. Attempt to generate the data for the widget.

Actual results:
Widget fails to run

Expected results:
Widget should report on the data fields specified.

Additional info:
See attached widget import and also look at the error message from the evm.log:

ERROR -- : MIQ(MiqWidget.generate_one_content_for_group) Widget: [Chargeback - Gen3 VMs (last month)] ID: [925000000000033] Failed for [MiqGroup] [EvmGroup-super_administrator] with error: [NoMethodError] [undefined method `self_service_user?' for nil:NilClass]
ERROR -- : [NoMethodError]: undefined method `self_service_user?' for nil:NilClass  Method:[rescue in generate_one_content_for_group]
ERROR -- : /var/www/miq/vmdb/app/models/chargeback.rb:77:in `build_results_for_report_chargeback'
ERROR -- : MIQ(MiqWidget.generate_content) Widget: [Chargeback - Gen3 VMs (last month)] ID: [925000000000033] Expected 1 contents, received 0 contents for Group: EvmGroup-super_administrator

Comment 3 Nick Carboni 2015-09-30 13:45:04 UTC
Kevin,

Can you also attach the original report YAML as it was exported from the 5.2 appliance?

Thanks

Comment 4 Kevin Morey 2015-09-30 14:15:09 UTC
Attached is the yml from my older appliance. Correction it was  5.3.2.6.20150108100920_387a856 not 5.2.

Comment 5 Kevin Morey 2015-09-30 14:15:46 UTC
Created attachment 1078668 [details]
reports from 5.3.2

Comment 7 CFME Bot 2015-10-02 16:32:01 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/22182b56ebe4f902f320f232c2a10905eb3ede89

commit 22182b56ebe4f902f320f232c2a10905eb3ede89
Author:     Nick Carboni <ncarboni>
AuthorDate: Fri Oct 2 10:03:37 2015 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Fri Oct 2 10:40:33 2015 -0400

    Allow chargeback report to run with nil userid
    
    This assumes that a nil user is not a self service user.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1266270

 app/models/chargeback.rb       | 4 ++--
 spec/models/chargeback_spec.rb | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

Comment 8 Milan Falešník 2015-10-26 12:41:41 UTC
Verified in 5.5.0.7 against 5.4.2.0. The error that happened in 5.4.2.0 does not occur in 5.5.0.7.

Comment 10 errata-xmlrpc 2015-12-08 13:33:07 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.