Bug 1658580 - undefined method `[]' for nil:NilClass [vm_infra/explorer] in Lifecycle Provisioning
Summary: undefined method `[]' for nil:NilClass [vm_infra/explorer] in Lifecycle P...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Dávid Halász
QA Contact: Sudhir Mallamprabhakara
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-12 12:50 UTC by Vatsal Parekh
Modified: 2018-12-14 13:01 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-14 13:01:16 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)
screenshot (82.86 KB, image/png)
2018-12-12 12:50 UTC, Vatsal Parekh
no flags Details

Description Vatsal Parekh 2018-12-12 12:50:22 UTC
Created attachment 1513663 [details]
screenshot

Description of problem:
When going to provision VMs via Infra->Lifecycle, The UI shows 500 internal error for undefined method `[]' for nil:NilClass [vm_infra/explorer] 
Production.log shows below traceback
Note: This occurred when using the CNV Provider, but developers suggest that this is not CNV specific

production.log
```
[----] I, [2018-12-12T07:37:27.408301 #15164:16f6f5c]  INFO -- :   Parameters: {"model_name"=>"VmOrTemplate", "model"=>"VmOrTemplate", "active_tree"=>"vandt_tree", "explorer"=>true, "additional_options"=>{"named
_scope"=>["with_ems"], "gtl_dbname"=>nil, "model"=>"VmOrTemplate", "match_via_descendants"=>nil, "parent_id"=>"12", "parent_class_name"=>"ManageIQ::Providers::Kubevirt::InfraManager", "parent_method"=>nil, "asso
ciation"=>"all_vms_and_templates", "view_suffix"=>nil, "row_button"=>nil, "menu_click"=>nil, "sb_controller"=>nil, "embedded"=>nil, "showlinks"=>nil, "policy_sim"=>nil, "in_a_form"=>nil, "lastaction"=>"show_list
", "display"=>nil, "gtl_type"=>"grid", "supported_features_filter"=>nil, "clickable"=>nil, "no_checkboxes"=>nil, "report_name"=>nil, "custom_action"=>nil}, "vm"=>{}}
[----] I, [2018-12-12T07:37:27.503761 #15164:16f6f5c]  INFO -- : Completed 200 OK in 95ms (Views: 1.7ms | ActiveRecord: 18.7ms)
[----] I, [2018-12-12T07:37:29.741828 #15164:16f6638]  INFO -- : Started POST "/vm_infra/x_button?pressed=vm_miq_request_new" for 127.0.0.1 at 2018-12-12 07:37:29 -0500
[----] I, [2018-12-12T07:37:29.746877 #15164:16f6638]  INFO -- : Processing by VmInfraController#x_button as JS
[----] I, [2018-12-12T07:37:29.747022 #15164:16f6638]  INFO -- :   Parameters: {"pressed"=>"vm_miq_request_new"}
[----] I, [2018-12-12T07:37:29.763586 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2018-12-12T07:37:29.764377 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/_flash_msg.html.haml (0.0ms)
[----] I, [2018-12-12T07:37:29.764808 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/_info_msg.html.haml (0.0ms)
[----] I, [2018-12-12T07:37:29.765879 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/angular/_gtl.html.haml (1.7ms)
[----] I, [2018-12-12T07:37:29.765983 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/_x_gtl.html.haml (1.9ms)
[----] I, [2018-12-12T07:37:29.766050 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/miq_request/_pre_prov.html.haml (2.6ms)
[----] I, [2018-12-12T07:37:29.766865 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/_x_adv_searchbox.html.haml (0.4ms)
[----] I, [2018-12-12T07:37:29.767911 #15164:16f6638]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/_x_edit_buttons.html.haml (0.7ms)
[----] I, [2018-12-12T07:37:29.770906 #15164:16f6638]  INFO -- : Completed 200 OK in 24ms (Views: 1.1ms | ActiveRecord: 1.9ms)
[----] I, [2018-12-12T07:37:30.072755 #15164:16f8e60]  INFO -- : Started POST "/vm_infra/report_data" for 127.0.0.1 at 2018-12-12 07:37:30 -0500
[----] I, [2018-12-12T07:37:30.077807 #15164:16f8e60]  INFO -- : Processing by VmInfraController#report_data as HTML
[----] I, [2018-12-12T07:37:30.077968 #15164:16f8e60]  INFO -- :   Parameters: {"model_name"=>"ManageIQ::Providers::InfraManager::Template", "model"=>"ManageIQ::Providers::InfraManager::Template", "active_tree"=
>"vandt_tree", "explorer"=>true, "additional_options"=>{"named_scope"=>["eligible_for_provisioning", "non_deprecated"], "gtl_dbname"=>nil, "model"=>"ManageIQ::Providers::InfraManager::Template", "match_via_desce
ndants"=>nil, "parent_id"=>nil, "parent_class_name"=>nil, "parent_method"=>nil, "association"=>nil, "view_suffix"=>nil, "row_button"=>nil, "menu_click"=>nil, "sb_controller"=>nil, "embedded"=>nil, "showlinks"=>n
il, "policy_sim"=>nil, "in_a_form"=>nil, "lastaction"=>nil, "display"=>nil, "gtl_type"=>"list", "supported_features_filter"=>nil, "clickable"=>nil, "no_checkboxes"=>true, "report_name"=>"ProvisionInfraTemplates.
yaml", "custom_action"=>{"url"=>"/miq_request/pre_prov/?sel_id=", "type"=>"provisioning"}}, "vm"=>{}}
[----] F, [2018-12-12T07:37:30.092256 #15164:16f8e60] FATAL -- : Error caught: [NoMethodError] undefined method `[]' for nil:NilClass
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/controllers/application_controller/advanced_search.rb:37:in `adv_search_build'
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/controllers/application_controller.rb:1389:in `get_view'
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/controllers/application_controller.rb:435:in `report_data'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-5.0.7.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.7.1/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/routing/route_set.rb:727:in `call'
/opt/rh/cfme-gemset/bundler/gems/cfme-graphql-5751b531db81/lib/manageiq/graphql/rest_api_proxy.rb:18:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/var/www/miq/vmdb/lib/request_started_on_middleware.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/conditional_get.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.7.1/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.7.1/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.7.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7.1/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.7.1/lib/rails/engine.rb:522:in `call'
/usr/share/gems/gems/puma-3.7.1/lib/puma/configuration.rb:232:in `call'
/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:578:in `handle_request'
/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:415:in `process_client'
/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:275:in `block in run'
/usr/share/gems/gems/puma-3.7.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
[----] I, [2018-12-12T07:37:30.096785 #15164:16f8e60]  INFO -- :   Rendering /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-7ab8c3b22c21/app/views/layouts/exception.html.haml within layouts/application

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


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