Description of problem: accessing to vm_infra/explorer raises "On cloudforms management engine 5.4.0.5, when going to "infrasctructure/virtual machines" I get an error with "Error caught: [ArgumentError] comparison of Array with Array failed"" Version-Release number of selected component (if applicable): cfme 5.4.0.5 How reproducible: all the time using the customer's database Steps to Reproduce: 1. import the database of the customer onto a 5.4.0.5 appliance (region 1) 2. reset password for admin to smartvm 3. go to "infrastructure/virtual machines" (aka vm_infra/explorer) Actual results: [----] I, [2015-07-13T07:23:26.454029 #6912:ee7e9c] INFO -- : Started GET "/vm_infra/explorer" for 127.0.0.1 at 2015-07-13 07:23:26 -0400 [----] I, [2015-07-13T07:23:26.520405 #6912:ee7e9c] INFO -- : Processing by VmInfraController#explorer as HTML [----] F, [2015-07-13T07:23:30.908246 #6912:ee7e9c] FATAL -- : Error caught: [ArgumentError] comparison of Array with Array failed /var/www/miq/lib/util/extensions/miq-hash.rb:14:in `sort_by' /var/www/miq/lib/util/extensions/miq-hash.rb:14:in `sort_by!' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:98:in `sort_tree' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:95:in `block in sort_tree' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:94:in `each' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:94:in `sort_tree' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:95:in `block in sort_tree' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:94:in `each' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:94:in `sort_tree' /var/www/miq/vmdb/app/presenters/tree_builder_vms_and_templates.rb:23:in `relationship_tree' /var/www/miq/vmdb/app/presenters/full_tree_builder.rb:20:in `tree' /var/www/miq/vmdb/app/controllers/application_controller/explorer.rb:472:in `block in x_get_tree_roots' /var/www/miq/vmdb/app/controllers/application_controller/explorer.rb:472:in `collect!' /var/www/miq/vmdb/app/controllers/application_controller/explorer.rb:472:in `x_get_tree_roots' /var/www/miq/vmdb/app/controllers/application_controller/explorer.rb:261:in `x_get_tree_objects' /var/www/miq/vmdb/app/controllers/application_controller/explorer.rb:220:in `x_build_dynatree' /var/www/miq/vmdb/app/controllers/mixins/vm_show_mixin.rb:180:in `build_vm_tree' /var/www/miq/vmdb/app/controllers/mixins/vm_show_mixin.rb:30:in `block in explorer' /var/www/miq/vmdb/app/controllers/mixins/vm_show_mixin.rb:30:in `each' /var/www/miq/vmdb/app/controllers/mixins/vm_show_mixin.rb:30:in `explorer' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/base.rb:167:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:568:in `_run__3593125282870685446__process_action__1859712018695581594__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/base.rb:121:in `process' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/rendering.rb:45:in `process' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal.rb:203:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal.rb:246:in `block in action' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:36:in `call' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:608:in `call' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/flash.rb:242:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/query_cache.rb:64:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `_run__1147215440814815215__call__2282536202474485154__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:608:in `call' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!' /opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/flash.rb:242:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/query_cache.rb:64:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `_run__1147215440814815215__call__2282536202474485154__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/logger.rb:32:in `call_app' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/logger.rb:18:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/request_id.rb:22:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/engine.rb:484:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/application.rb:231:in `call' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/log_tailer.rb:17:in `call' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' /opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine' /opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' /opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/server.rb:159:in `start' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run' /opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/server.rb:268:in `start' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/server.rb:70:in `start' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:55:in `block in <top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:50:in `tap' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>' [----] I, [2015-07-13T07:23:30.919658 #6912:ee7e9c] INFO -- : Rendered layouts/_exception_contents.html.haml (4.7ms) [----] I, [2015-07-13T07:23:30.919861 #6912:ee7e9c] INFO -- : Rendered layouts/exception.html.haml within layouts/application (7.5ms) [----] I, [2015-07-13T07:23:30.926086 #6912:ee7e9c] INFO -- : Rendered stylesheets/_template50.html.haml (0.5ms) [----] I, [2015-07-13T07:23:30.932165 #6912:ee7e9c] INFO -- : Rendered layouts/_global_header.html.haml (11.9ms) [----] I, [2015-07-13T07:23:30.932523 #6912:ee7e9c] INFO -- : Rendered layouts/_page.html.haml (0.1ms) [----] I, [2015-07-13T07:23:30.932974 #6912:ee7e9c] INFO -- : Rendered layouts/_adv_search.html.haml (0.1ms) [----] I, [2015-07-13T07:23:30.933192 #6912:ee7e9c] INFO -- : Rendered layouts/_global_footer.html.haml (0.5ms) [----] I, [2015-07-13T07:23:30.933566 #6912:ee7e9c] INFO -- : Completed 500 Internal Server Error in 4412.9ms (Views: 24.3ms | ActiveRecord: 152.1ms) Expected results: the list of virtual machines displays correctly Additional info: - reproduced only after importing the customer database - the customer has one vmware provider that successfully refreshed its state 3 days prior to the database being exported. - the user used to reproduce the issue was admin.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/c37c874546badb692f7c24d76cad80282800190d commit c37c874546badb692f7c24d76cad80282800190d Author: Harpreet Kataria <hkataria> AuthorDate: Wed Jul 15 11:10:46 2015 -0400 Commit: Harpreet Kataria <hkataria> CommitDate: Wed Jul 15 11:10:46 2015 -0400 Fixed issue in sort_tree method for VMs & Templates tree. - Sorting an array by boolean was blowing up with "comparison of Array with Array failed" error, in this case customer's db had 2 EmsFolders at same level 1 was a datacenter and other one was not a datacenter, so in this case second parameter passed in to sort_by call was a boolean as a fix replaced boolean with 0,1 Sorting of arrays containing identical boolean values (ALL true or ALL false) works fine, but if 1 value differs sort throws an exception, as an example [false, true].sort fails in irb - Added spec test to verify the fix. https://bugzilla.redhat.com/show_bug.cgi?id=1242459 app/presenters/tree_builder_vms_and_templates.rb | 2 +- .../tree_builder_vms_and_templates_spec.rb | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 spec/presenters/tree_builder_vms_and_templates_spec.rb
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5192b83373c58ef8f88f6f95978f06b02ce09e83 commit 5192b83373c58ef8f88f6f95978f06b02ce09e83 Author: Harpreet Kataria <hkataria> AuthorDate: Wed Jul 15 15:02:47 2015 -0400 Commit: Harpreet Kataria <hkataria> CommitDate: Wed Jul 15 15:02:47 2015 -0400 Fixed issue in sort_tree method for VMs & Templates tree. - Sorting an array by boolean was blowing up with "comparison of Array with Array failed" error, in this case customer's db had 2 EmsFolders at same level 1 was a datacenter and other one was not a datacenter, so in this case second parameter passed in to sort_by call was a boolean as a fix replaced boolean with 0,1 Sorting of arrays containing identical boolean values (ALL true or ALL false) works fine, but if 1 value differs sort throws an exception, as an example [false, true].sort fails in irb - Added spec test to verify the fix. https://bugzilla.redhat.com/show_bug.cgi?id=1242459 https://bugzilla.redhat.com/show_bug.cgi?id=1243496 .../presenters/tree_builder_vms_and_templates.rb | 2 +- .../tree_builder_vms_and_templates_spec.rb | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 vmdb/spec/presenters/tree_builder_vms_and_templates_spec.rb
New commit detected on cfme/5.4.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6d08e83bdae38645bcc55daac5dd06e8a1dc4821 commit 6d08e83bdae38645bcc55daac5dd06e8a1dc4821 Merge: 7b686f4 5192b83 Author: Dan Clarizio <dclarizi> AuthorDate: Wed Jul 15 15:19:53 2015 -0400 Commit: Dan Clarizio <dclarizi> CommitDate: Wed Jul 15 15:19:53 2015 -0400 Merge branch '54z_bz_1243496' into '5.4.z' Fixed issue in sort_tree method for VMs & Templates tree. - Sorting an array by boolean was blowing up with "comparison of Array with Array failed" error, in this case customer's db had 2 EmsFolders at same level 1 was a datacenter and other one was not a datacenter, so in this case second parameter passed in to sort_by call was a boolean as a fix replaced boolean with 0,1 Sorting of arrays containing identical boolean values (ALL true or ALL false) works fine, but if 1 value differs sort throws an exception, as an example [false, true].sort fails in irb - Added spec test to verify the fix. https://bugzilla.redhat.com/show_bug.cgi?id=1242459 https://bugzilla.redhat.com/show_bug.cgi?id=1243496 @dclarizio please review, applied clean patch from master, original PR: https://github.com/ManageIQ/manageiq/pull/3460 See merge request !182 .../presenters/tree_builder_vms_and_templates.rb | 2 +- .../tree_builder_vms_and_templates_spec.rb | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-)
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