Bug 1272616

Summary: Unexpected error while accessing accordions on Cloud Intelligence->Reports as tenant admin
Product: Red Hat CloudForms Management Engine Reporter: Nandini Chandra <nachandr>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: dclarizi, hkataria, jhardy, mfeifer, mpovolny, obarenbo
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.0.7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 13:39:24 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:
Embargoed:

Description Nandini Chandra 2015-10-16 23:01:12 UTC
Description of problem:
------------------------
I encountered an unexpected error while accessing accordions on Cloud Intelligence->Reports as tenant admin.

Error text seen on the UI:

undefined method `split' for nil:NilClass [report/accordion_select]

Snippet from production.log:

[----] I, [2015-10-16T18:45:53.020085 #2923:12b5998]  INFO -- : Started POST "/report/accordion_select?id=savedreports_accord" for 127.0.0.1 at 2015-10-16 18:45:53 -0400
[----] I, [2015-10-16T18:45:53.022517 #2923:12b5998]  INFO -- : Processing by ReportController#accordion_select as JS
[----] I, [2015-10-16T18:45:53.022661 #2923:12b5998]  INFO -- :   Parameters: {"id"=>"savedreports_accord"}
[----] F, [2015-10-16T18:45:53.058616 #2923:12b5998] FATAL -- : Error caught: [NoMethodError] undefined method `split' for nil:NilClass
/var/www/miq/vmdb/app/presenters/tree_builder.rb:173:in `extract_node_model_and_id'
/var/www/miq/vmdb/app/controllers/application_controller/explorer.rb:766:in `valid_active_node'
/var/www/miq/vmdb/app/controllers/report_controller.rb:552:in `get_node_info'
/var/www/miq/vmdb/app/controllers/report_controller.rb:689:in `replace_right_cell'
/var/www/miq/vmdb/app/controllers/report_controller.rb:248:in `accordion_select'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:198:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-4.2.4/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:137:in `process'
/opt/rh/cfme-gemset/gems/actionview-4.2.4/lib/action_view/rendering.rb:30:in `process'


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


How reproducible:
----------------
Always


Steps to Reproduce:
-------------------
1.Create a child tenant under 'My Company'.
2.Create a tenant admin user under this tenant
3.Log in as this user and access accordions on Cloud Intelligence->Reports.


Actual results:
--------------
Error occurs


Expected results:
----------------
No error


Additional info:
---------------

Comment 3 CFME Bot 2015-10-19 21:42:51 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/275ce32cb19ed1d401968a950c5b860e302c6591

commit 275ce32cb19ed1d401968a950c5b860e302c6591
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Oct 19 14:57:49 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Oct 19 14:57:49 2015 -0400

    Fixed a typo.
    
    - Fixed a typo in the roles tree building code while trying to access user's group info, changing accordions in Reports explorer was blowing up because due to this typo reports tree builder did not finish building all the trees.
    - Added spec test to verify the fix.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1272616

 app/presenters/tree_builder_report_roles.rb       |  2 +-
 spec/presenters/tree_builder_report_roles_spec.rb | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 spec/presenters/tree_builder_report_roles_spec.rb

Comment 6 Nandini Chandra 2015-10-28 18:12:21 UTC
Verified in 5.5.0.7

Comment 8 errata-xmlrpc 2015-12-08 13:39:24 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