Created attachment 987493 [details] vm ownership transfer error Description of problem: "undefined method `sub_table' for nil:NilClass [vm_infra/ownership_update]" error found while changing the vm ownership Version-Release number of selected component (if applicable): 5.3.3.0.1.20150127115148_446974b How reproducible: 100% Steps to Reproduce: 1. As Admin, Navigate to Configure ==> Configuration ==> Access Control 2. Create a new role with "VM & Template Access Restriction" as "Only User or Group Owned" or "Only User Owned". Make sure all the module access is given in "Product Features (Editing)" i.e., Everything is checked 3. Create a new group with the above role 4. Create a new user with the above group 5. Now navigate to Infrastructure ==> virtual Machines ==> Choose any vm ==> Configuration ==> Set Ownership to the above created user 6. Login with the newly created user and navigate to Infrastructure ==> virtual Machines 7. Choose the displayed vm ==> Configuration ==> Set Ownership to any other user (say admin) Actual results: 1. WebUI displays the following error - "undefined method `sub_table' for nil:NilClass [vm_infra/ownership_update]". Refer the screenshot and production.log file for more information. 2. Following error message is shown when clicking on other modules or any other pages for more than 2-3 times "User '<username>' is not authorized to access 'VM or Template' record id '<vm-id>' Expected results: Should display error message stating only once without any error in the WebUI or production.log file Additional info: production.log: ============== [----] I, [2015-02-03T10:32:44.543225 #2340:aeb80c] INFO -- : Parameters: {"button"=>"save"} [----] I, [2015-02-03T10:32:44.808904 #2340:aeb80c] INFO -- : Rendered layouts/_x_gtl.html.erb (2.8ms) [----] F, [2015-02-03T10:32:44.809370 #2340:aeb80c] FATAL -- : Error caught: [NoMethodError] undefined method `sub_table' for nil:NilClass /var/www/miq/vmdb/app/views/layouts/_x_gtl.html.erb:23:in `_app_views_layouts__x_gtl_html_erb__131039331380209548_77453100' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/template.rb:145:in `block in render' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:125:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/template.rb:143:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/partial_renderer.rb:238:in `block in render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/partial_renderer.rb:237:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/renderer.rb:41:in `render_partial' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_view/renderer/renderer.rb:15:in `render' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/rendering.rb:110:in `_render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/streaming.rb:225:in `_render_template' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/rendering.rb:103:in `render_to_body' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/renderers.rb:28:in `render_to_body' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/compatibility.rb:50:in `render_to_body' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/rendering.rb:96:in `render_to_string' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/rendering.rb:23:in `render_to_string' /var/www/miq/vmdb/app/controllers/vm_common.rb:1762:in `block in replace_right_cell' /var/www/miq/vmdb/app/controllers/vm_common.rb:1821:in `[]' /var/www/miq/vmdb/app/controllers/vm_common.rb:1821:in `replace_right_cell' /var/www/miq/vmdb/app/controllers/application_controller/ci_processing.rb:162:in `ownership_update' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/base.rb:167:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:513:in `_run__1262453299639681654__process_action__695683897013607829__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/callbacks.rb:17:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.17/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/base.rb:121:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/abstract_controller/rendering.rb:45:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal.rb:203:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_controller/metal.rb:246:in `block in action' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/routing/route_set.rb:73:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/routing/route_set.rb:36:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/routing/route_set.rb:608:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!' /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/flash.rb:242:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/cookies.rb:341:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.17/lib/active_record/query_cache.rb:64:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:405:in `_run__2110481108381911444__call__3370325759714504123__callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/rack/logger.rb:32:in `call_app' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/rack/logger.rb:18:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/request_id.rb:22:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.17/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.17/lib/action_dispatch/middleware/static.rb:63:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/engine.rb:484:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/application.rb:231:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/rack/log_tailer.rb:17:in `call' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' /opt/rh/ruby193/root/usr/share/gems/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine' /opt/rh/ruby193/root/usr/share/gems/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' /opt/rh/ruby193/root/usr/share/gems/gems/thin-1.3.1/lib/thin/server.rb:159:in `start' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.5/lib/rack/server.rb:268:in `start' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/server.rb:70:in `start' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:55:in `block in <top (required)>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:50:in `tap' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>' [----] I, [2015-02-03T10:32:44.810992 #2340:aeb80c] INFO -- : Rendered layouts/_exception_contents.html.erb (0.2ms) [----] I, [2015-02-03T10:32:44.811667 #2340:aeb80c] INFO -- : Completed 200 OK in 268.3ms (Views: 1.8ms | ActiveRecord: 38.6ms)
This issue exists in 5.3.0/1/2 This issue occurs when setting ownership from the summary page. Setting ownership from list view page works fine.
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=74056595a1197aca78951e537bc22504e90756fc commit 74056595a1197aca78951e537bc22504e90756fc Author: Martin Hradil <mhradil> AuthorDate: Tue Feb 10 12:15:18 2015 +0000 Commit: Martin Hradil <mhradil> CommitDate: Fri Feb 20 14:19:56 2015 +0000 Fix _x_gtl failing when view is nil + haml This is actually supposed to be a cherry-pick of 4cd194a342dd27e2952fb2b23273dfee5ce85afb, but due to the conversion from erb to haml, it's really just the relevant file from 3399ec6, 4a6c012 and 4cd194a. https://bugzilla.redhat.com/show_bug.cgi?id=1188597 vmdb/app/views/layouts/_x_gtl.html.erb | 51 --------------------------------- vmdb/app/views/layouts/_x_gtl.html.haml | 38 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 51 deletions(-) delete mode 100755 vmdb/app/views/layouts/_x_gtl.html.erb create mode 100755 vmdb/app/views/layouts/_x_gtl.html.haml
Good to go. Verified and working fine in 5.4.0.0.12.20150312013923_aa9b093
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://rhn.redhat.com/errata/RHBA-2015-1100.html