Description of problem: Getting an error when trying to go to Host summary screen Version-Release number of selected component (if applicable): How reproducible:100% Steps to Reproduce: 1.Go to list of Hosts 2. Try to click on a Host, that throws an error 3. Actual results: Error text: Primary key not included in the custom select clause [host/show] Expected results: Should show Host summary screen Additional info: error from log [----] F, [2015-11-13T12:29:13.841610 #16552:ed5990] FATAL -- : Error caught: [RuntimeError] Primary key not included in the custom select clause /home/hkataria/.rvm/gems/ruby-2.2.2/bundler/gems/rails-e2fcb2b4aec6/activerecord/lib/active_record/relation/batches.rb:122:in `find_in_batches' /home/hkataria/.rvm/gems/ruby-2.2.2/gems/activerecord-deprecated_finders-1.0.4/lib/active_record/deprecated_finders/relation.rb:70:in `find_in_batches' /home/hkataria/.rvm/gems/ruby-2.2.2/bundler/gems/rails-e2fcb2b4aec6/activerecord/lib/active_record/relation/batches.rb:50:in `find_each' /home/hkataria/dev/manageiq/app/models/miq_cim_instance.rb:229:in `getAssociators' /home/hkataria/dev/manageiq/app/models/miq_cim_host_system.rb:167:in `logical_disks' /home/hkataria/.rvm/gems/ruby-2.2.2/bundler/gems/rails-e2fcb2b4aec6/activesupport/lib/active_support/core_ext/object/try.rb:77:in `public_send' /home/hkataria/.rvm/gems/ruby-2.2.2/bundler/gems/rails-e2fcb2b4aec6/activesupport/lib/active_support/core_ext/object/try.rb:77:in `try!' /home/hkataria/.rvm/gems/ruby-2.2.2/bundler/gems/rails-e2fcb2b4aec6/activesupport/lib/active_support/core_ext/object/try.rb:63:in `try' /home/hkataria/dev/manageiq/app/models/host.rb:1816:in `logical_disks' /home/hkataria/dev/manageiq/app/views/layouts/listnav/_host.html.haml:146:in `block in _app_views_layouts_listnav__host_html_haml___4028069473646552187_198802740'
https://github.com/ManageIQ/manageiq/pull/5496
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/4373259e0b1da3d9c0e0fbe8bfdd63f25d828e99 commit 4373259e0b1da3d9c0e0fbe8bfdd63f25d828e99 Author: Joe Rafaniello <jrafanie> AuthorDate: Wed Nov 18 09:22:22 2015 -0500 Commit: Joe Rafaniello <jrafanie> CommitDate: Wed Nov 18 11:46:10 2015 -0500 find_each with a custom select needs the primary key Fixes: `Primary key not included in the custom select clause` Add basic test of #getAssociators and #getAssociatedVmdbObjs https://bugzilla.redhat.com/show_bug.cgi?id=1281890 app/models/miq_cim_instance.rb | 4 ++-- spec/factories/miq_cim_association.rb | 4 ++++ spec/factories/miq_cim_instance.rb | 4 ++++ spec/models/miq_cim_instance_spec.rb | 28 ++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 spec/factories/miq_cim_association.rb create mode 100644 spec/factories/miq_cim_instance.rb create mode 100644 spec/models/miq_cim_instance_spec.rb
This bug has been open for more than a year and is assigned to an older release of CloudForms. If you would like to keep this Bugzilla open and if the issue is still present in the latest version of the product, please file a new Bugzilla which will be added and assigned to the latest release of CloudForms.