Bug 1281890 - Host summary screen throwing an error
Summary: Host summary screen throwing an error
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: cfme-future
Assignee: Rich Oliveri
QA Contact: Satyajit Bulage
URL:
Whiteboard: ui:host
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-13 17:35 UTC by Harpreet Kataria
Modified: 2017-08-21 13:09 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-21 13:06:51 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Harpreet Kataria 2015-11-13 17:35:28 UTC
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'

Comment 7 CFME Bot 2015-11-24 03:51:08 UTC
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

Comment 8 Chris Pelland 2017-08-21 13:06:51 UTC
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.

Comment 9 Chris Pelland 2017-08-21 13:09:21 UTC
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.


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