Bug 1393675 - C&U Configuration Screen does not display anything
Summary: C&U Configuration Screen does not display anything
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.8.0
Assignee: Marcel Hild
QA Contact: Nandini Chandra
URL:
Whiteboard: ui:c&u:configuration
: 1394432 1446414 1446576 (view as bug list)
Depends On:
Blocks: 1403011
TreeView+ depends on / blocked
 
Reported: 2016-11-10 06:57 UTC by Jerome Marc
Modified: 2020-06-11 13:04 UTC (History)
15 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1403011 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:42:15 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jerome Marc 2016-11-10 06:57:34 UTC
Description of problem:
A FATAL exception occurs in production.log causing the C&U configuration screen to be entirely blank.

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

How reproducible:
Always (in this environment)

Steps to Reproduce:
1. Go to Configuration > Settings > CFME Region
2. Click on the C&U Collection tag

Actual results:
Nothing is displayed and a FATAL error appears in production.log

[----] I, [2016-11-10T00:48:03.118877 #7085:18495a8]  INFO -- : Started POST "/ops/change_tab/?tab_id=settings_cu_collection" for 127.0.0.1 at 2016-11-10 00:48:03 -0500
[----] I, [2016-11-10T00:48:03.180159 #7085:18495a8]  INFO -- : Processing by OpsController#change_tab as JS
[----] I, [2016-11-10T00:48:03.180248 #7085:18495a8]  INFO -- :   Parameters: {"tab_id"=>"settings_cu_collection"}
[----] F, [2016-11-10T00:48:03.994794 #7085:18495a8] FATAL -- : Error caught: [NoMethodError] undefined method `where' for nil:NilClass
/var/www/miq/vmdb/app/models/ext_management_system.rb:427:in `non_clustered_hosts'
/var/www/miq/vmdb/app/controllers/ops_controller/settings/cap_and_u.rb:334:in `block in build_cl_hosts_tree'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/relation/delegation.rb:38:in `each'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/relation/delegation.rb:38:in `each'
/var/www/miq/vmdb/app/controllers/ops_controller/settings/cap_and_u.rb:333:in `build_cl_hosts_tree'
/var/www/miq/vmdb/app/controllers/ops_controller/settings/cap_and_u.rb:195:in `cu_build_edit_screen'
/var/www/miq/vmdb/app/controllers/ops_controller/settings/common.rb:1113:in `settings_get_info'
/var/www/miq/vmdb/app/controllers/ops_controller.rb:184:in `change_tab'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.0.1/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/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.1/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/conditional_get.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:222:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:216:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/configuration.rb:224:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:561:in `handle_request'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:406:in `process_client'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:271:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'
/opt/rh/cfme-gemset/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call'
/opt/rh/cfme-gemset/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context'
[----] I, [2016-11-10T00:48:04.001098 #7085:18495a8]  INFO -- :   Rendered layouts/_exception_contents.html.haml (4.6ms)
[----] I, [2016-11-10T00:48:04.001758 #7085:18495a8]  INFO -- : Completed 200 OK in 821ms (Views: 6.3ms | ActiveRecord: 0.0ms)

Expected results:
Screen should be displayed.

Additional info:

Comment 3 Dave Johnson 2016-11-10 16:00:08 UTC
Matous, can you try to reproduce this on 5.7.0 please.

Comment 5 Joe Rafaniello 2016-11-11 19:47:27 UTC
I think it's failing on:
  def non_clustered_hosts
    hosts.where(:ems_cluster_id => nil)
  end

Are amazon providers supposed to have hosts?

Maybe someone on the providers team can help review.

Comment 6 Joe Rafaniello 2016-11-11 19:51:32 UTC
Ugh, azure, not amazon.  Thanks bugzilla, my typo is here forever.

Comment 7 Matouš Mojžíš 2016-11-14 16:26:16 UTC
I can see switch for collecting clusters and datastores in 5.7.0.10 there, so I suppose it's okay.

Comment 8 Bronagh Sorota 2016-11-14 17:58:18 UTC
I have clicked on this UI tab many many times without any problem. Today I tested this on the Darga release using an Azure provider and a SCVMM provider with unclustered hosts and it works fine. There is nothing we can do unless we get more specific steps that will enable us to reproduce this.

Comment 12 Marcel Hild 2016-11-17 18:21:33 UTC
*** Bug 1394432 has been marked as a duplicate of this bug. ***

Comment 21 Marcel Hild 2016-11-24 09:14:59 UTC
ok, the root cause is tracked here https://github.com/ManageIQ/manageiq/issues/12828

Comment 24 CFME Bot 2016-12-01 16:43:48 UTC
New commit detected on ManageIQ/manageiq-providers-amazon/master:
https://github.com/ManageIQ/manageiq-providers-amazon/commit/13cbb68b282c26449752c6127cba9e9c111a592b

commit 13cbb68b282c26449752c6127cba9e9c111a592b
Author:     Marcel Hild <hild>
AuthorDate: Mon Nov 28 15:13:11 2016 +0100
Commit:     Marcel Hild <hild>
CommitDate: Mon Nov 28 15:13:11 2016 +0100

    Add managers in before_create callback instead of before_validation
    
    otherwise it could happen that one process deletes the manager
    and another one saves it and the saving one would add back
    a deleted manager.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1389459
    https://bugzilla.redhat.com/show_bug.cgi?id=1393675

 app/models/manageiq/providers/amazon/cloud_manager.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 25 CFME Bot 2016-12-01 16:46:54 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/fab74b285e2d93f85456d9a0985081b5eb7b9aff

commit fab74b285e2d93f85456d9a0985081b5eb7b9aff
Author:     Marcel Hild <hild>
AuthorDate: Mon Nov 28 15:02:56 2016 +0100
Commit:     Marcel Hild <hild>
CommitDate: Mon Nov 28 15:02:56 2016 +0100

    Add managers in before_create callback instead of before_validation
    
    otherwise it could happen that one process deletes the manager
    and another one saves it and the saving one would add back
    a deleted manager.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1389459
    https://bugzilla.redhat.com/show_bug.cgi?id=1393675

 app/models/manageiq/providers/foreman/provider.rb        | 2 +-
 app/models/manageiq/providers/google/cloud_manager.rb    | 2 +-
 app/models/manageiq/providers/openstack/cloud_manager.rb | 2 +-
 app/models/manageiq/providers/openstack/infra_manager.rb | 2 +-
 app/models/manageiq/providers/vmware/cloud_manager.rb    | 2 +-
 spec/controllers/provider_foreman_controller_spec.rb     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

Comment 26 CFME Bot 2016-12-06 17:25:32 UTC
New commit detected on ManageIQ/manageiq-providers-azure/master:
https://github.com/ManageIQ/manageiq-providers-azure/commit/a2acb585c09633f903c194aae227fdf50e591a13

commit a2acb585c09633f903c194aae227fdf50e591a13
Author:     Marcel Hild <hild>
AuthorDate: Mon Nov 28 15:10:55 2016 +0100
Commit:     Marcel Hild <hild>
CommitDate: Mon Nov 28 15:10:55 2016 +0100

    Add managers in before_create callback instead of before_validation
    
    otherwise it could happen that one process deletes the manager
    and another one saves it and the saving one would add back
    a deleted manager.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1389459
    https://bugzilla.redhat.com/show_bug.cgi?id=1393675

 app/models/manageiq/providers/azure/cloud_manager.rb    |  2 +-
 .../manageiq/providers/azure/cloud_manager_spec.rb      | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

Comment 28 Marcel Hild 2016-12-08 21:09:41 UTC
https://github.com/ManageIQ/manageiq/pull/12878 is the PR that fixes this - not the PR in Comment #27

Comment 30 Marcel Hild 2016-12-08 21:33:01 UTC
Matous, for QE testing you can only replicate that in the UI by running a refresh and immediately destroying the provider and hope that it runs into this race conditions.

Comment 31 Matouš Mojžíš 2017-04-28 13:30:01 UTC
Verified in 5.8.0.12. After doing refresh and then immediately deleting provider I can still see C & U Collection page.

Comment 32 Marcel Hild 2017-04-29 10:01:09 UTC
*** Bug 1446414 has been marked as a duplicate of this bug. ***

Comment 33 Keenan Brock 2017-05-01 13:33:42 UTC
*** Bug 1446576 has been marked as a duplicate of this bug. ***


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