Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1575396 - GlobalDB is now presenting with undefined method `base_class' for NilClass:Class [vm_infra/explorer]
Summary: GlobalDB is now presenting with undefined method `base_class' for NilClass:Cl...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.3
Assignee: Gregg Tanzillo
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-06 14:31 UTC by David Luong
Modified: 2021-06-10 16:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-15 14:55:58 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
dluong: needinfo+


Attachments (Terms of Use)

Description David Luong 2018-05-06 14:31:16 UTC
Description of problem:
When going to the VMs view in the global DB we're now presented with the following:

Unexpected error encountered 

Errors in Management Engine can be caused by: 

① Accessing Management Engine from multiple tabs or windows of the same browser on a single machine. Close any duplicate browser sessions, then select an option from the menu. 
② Pressing the back button during a session. 
      Close any duplicate browser sessions, then select an option from the menu. 
③ An internal system error. 
      Please contact your administrator for assistance. 


undefined method `base_class' for NilClass:Class [vm_infra/explorer] 

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

How reproducible:
Always

Steps to Reproduce:
1.  Compute -> Infrastructure -> virtual machines
2.  
3.

Actual results:
Base class error displays

Expected results:
Able to see VMs

Additional info:
fix_relationships.rb also doesn't seem to do anything.  Displays:
No VM relationships to fix.

Stacktrace:
[----] F, [2018-05-05T22:48:02.965075 #12761:1ab6df4] FATAL -- : Error caught: [NoMethodError] undefined method `base_class' for NilClass:Class
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:102:in `block in sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-dd41a2772297/lib/gems/pending/util/extensions/miq-hash.rb:14:in `each'
/opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-dd41a2772297/lib/gems/pending/util/extensions/miq-hash.rb:14:in `sort_by'
/opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-dd41a2772297/lib/gems/pending/util/extensions/miq-hash.rb:14:in `sort_by!'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:100:in `sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:97:in `block in sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:96:in `each'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:96:in `sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:97:in `block in sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:96:in `each'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:96:in `sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:97:in `block in sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:96:in `each'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:96:in `sort_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vms_and_templates.rb:23:in `relationship_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/full_tree_builder.rb:20:in `tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vandt.rb:23:in `block in x_get_tree_roots'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vandt.rb:23:in `collect!'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder_vandt.rb:23:in `x_get_tree_roots'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder.rb:246:in `x_get_tree_objects'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder.rb:209:in `x_build_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder.rb:142:in `build_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/presenters/tree_builder.rb:26:in `initialize'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/controllers/application_controller/feature.rb:28:in `new'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/controllers/application_controller/feature.rb:28:in `build_tree'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/controllers/mixins/vm_show_mixin.rb:30:in `block in explorer'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/controllers/mixins/vm_show_mixin.rb:30:in `collect'
/opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-35beb5e894ab/app/controllers/mixins/vm_show_mixin.rb:30:in `explorer'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-5.0.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.3/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:725:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/conditional_get.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.3/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.3/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.3/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.3/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/configuration.rb:224:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:561:in `handle_request'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:406:in `process_client'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:271:in `block in run'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'

Comment 3 Gregg Tanzillo 2018-05-08 13:12:59 UTC
I looked at the appliance with the customers Db and found an an orphaned instance in the relationships table. I deleted the bad instance and that resolved the error. 

You can have the customer do the same. Here are the steps -

On an appliance in the global region open a rails console and type in this command -

Relationship.find(3000000160358).destroy

That should fix it.


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