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...
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting (Show other bugs)
All All
unspecified Severity high
: GA
: 5.5.0
Assigned To: Nick Carboni
Milan Falešník
Depends On:
  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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-08 08:33:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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): 

How reproducible:

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 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

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

Comment 4 Kevin Morey 2015-09-30 10:15:09 EDT
Attached is the yml from my older appliance. Correction it was 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:

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.

 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 against The error that happened in does not occur in
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.


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