Bug 1266270 - ERROR -- : [NoMethodError]: undefined method `self_service_user?' for nil:NilClass Method:[rescue in generate_one_content_for_group]
ERROR -- : [NoMethodError]: undefined method `self_service_user?' for nil:Nil...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting (Show other bugs)
5.4.0
All All
unspecified Severity high
: GA
: 5.5.0
Assigned To: Nick Carboni
Milan Falešník
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-24 19:39 EDT by Kevin Morey
Modified: 2015-12-08 08:33 EST (History)
7 users (show)

See Also:
Fixed In Version: 5.5.0.5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 08:33:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
widget import (4.55 KB, text/x-vhdl)
2015-09-24 19:39 EDT, Kevin Morey
no flags Details
reports from 5.3.2 (7.05 KB, text/x-vhdl)
2015-09-30 10:15 EDT, Kevin Morey
no flags Details

  None (edit)
Description Kevin Morey 2015-09-24 19:39:25 EDT
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 09:45:04 EDT
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 10:15:09 EDT
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 10:15 EDT
Created attachment 1078668 [details]
reports from 5.3.2
Comment 7 CFME Bot 2015-10-02 12:32:01 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/22182b56ebe4f902f320f232c2a10905eb3ede89

commit 22182b56ebe4f902f320f232c2a10905eb3ede89
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Fri Oct 2 10:03:37 2015 -0400
Commit:     Nick Carboni <ncarboni@redhat.com>
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 08:41:41 EDT
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 08:33:07 EST
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.