Bug 1213044 - undefined method `id' for nil:NilClass [host/firewall_rules] while navigating to host firewall rules page
Summary: undefined method `id' for nil:NilClass [host/firewall_rules] while navigating...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.4.0
Assignee: Jozef Zigmund
QA Contact: Nandini Chandra
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-18 03:21 UTC by Nandini Chandra
Modified: 2015-06-16 12:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:58:57 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Nandini Chandra 2015-04-18 03:21:57 UTC
Description of problem:
------------------------
I encountered this error while navigating to host firewall rules page.

Error text:

undefined method `id' for nil:NilClass [host/firewall_rules]


Snippet from production.log
----------------------------
[----] I, [2015-04-17T22:53:24.265628 #2429:116beac]  INFO -- : Started GET "/host/firewall_rules/10000000000003" for 127.0.0.1 at 2015-04-17 22:53:24 -0400

[----] I, [2015-04-17T22:53:24.274152 #2429:116beac]  INFO -- : Processing by HostController#firewall_rules as HTML

[----] I, [2015-04-17T22:53:24.274223 #2429:116beac]  INFO -- :   Parameters: {"id"=>"10000000000003"}

[----] I, [2015-04-17T22:53:24.362618 #2429:116beac]  INFO -- :   Rendered host/show.html.haml within layouts/application (1.0ms)

[----] F, [2015-04-17T22:53:24.362893 #2429:116beac] FATAL -- : Error caught: [NoMethodError] undefined method `id' for nil:NilClass
/var/www/miq/vmdb/app/views/host/show.html.haml:3:in `_app_views_host_show_html_haml___2246047420340081006_133307300'

/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/template.rb:145:in `block in render'

/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:125:in `instrument'

/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/template.rb:143:in `render'

/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'

/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/rendererif the host has /abstract_renderer.rb:38:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/template_renderer.rb:18:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/renderer.rb:36:in `render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'

/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-if the host has 8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/renderers.rb:2/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_view/renderer/renderer.rb:17:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:110:in `_render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/opt/rh/ruby200/root/usr/share/ruby/benchmark.rb:296:in `realtime'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/var/www/miq/vmdb/app/controllers/application_controller/ci_processing.rb:531:in `show_details'
/var/www/miq/vmdb/app/controllers/application_controller/ci_processing.rb:1934:in `show_association'
/var/www/miq/vmdb/app/controllers/host_controller.rb:162:in `firewall_rules'8:in `render_to_body'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:88:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rendering.rb:16:in `render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/opt/rh/ruby200/root/usr/share/ruby/benchmark.rb:296:in `realtime'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
/var/www/miq/vmdb/app/controllers/application_controller/ci_processing.rb:531:in `show_details'
/var/www/miq/vmdb/app/controllers/application_controller/ci_processing.rb:1934:in `show_association'
/var/www/miq/vmdb/app/controllers/host_controller.rb:162:in `firewall_rules'


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


How reproducible:
----------------
Always


Steps to Reproduce:
------------------
1.On the summary page of a host,under the Relationships accordion,click any link with a >1 count.
For eg:if the host has multiple VMs,but a single template,click the VMs link.
2.From the VM list page,switch to any other view(Tile/Grid/List) from the current view
3.From the security accordion,click 'Firewall Rules'.


Actual results:
-------------


Expected results:
-----------------


Additional info:
----------------

Comment 2 Jozef Zigmund 2015-04-21 14:19:06 UTC
The displaying of host firewall rules works as expected. Tested on current master, please verify.

Comment 4 Nandini Chandra 2015-05-01 15:58:23 UTC
Tested master.20150430174944_6608499.Issue is seen on this build as well.

Comment 7 CFME Bot 2015-05-18 18:36:11 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d06a9b4f6c86ec3a890f39d4fcb6f6d8ecf206c8

commit d06a9b4f6c86ec3a890f39d4fcb6f6d8ecf206c8
Author:     Jozef Zigmund <jzigmund>
AuthorDate: Mon May 18 18:26:28 2015 +0200
Commit:     Jozef Zigmund <jzigmund>
CommitDate: Mon May 18 18:26:28 2015 +0200

    Fix setting of @display to 'main' when Host/Firewall Rules page
    
    When user wants to see Host/Security/Firewall Rules and previously
    displayed information changed the value of @display then value 'main'
    has to be assigned to @display
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213044

 vmdb/app/controllers/host_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 10 CFME Bot 2015-05-19 15:26:04 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=2c74e9e8ba75492bd3ec1fbc39c570b398e5f2ee

commit 2c74e9e8ba75492bd3ec1fbc39c570b398e5f2ee
Author:     Jozef Zigmund <jzigmund>
AuthorDate: Mon May 18 18:26:28 2015 +0200
Commit:     Jozef Zigmund <jzigmund>
CommitDate: Tue May 19 15:24:56 2015 +0200

    Fix setting of @display to 'main' when Host/Firewall Rules page
    
    When user wants to see Host/Security/Firewall Rules and previously
    displayed information changed the value of @display then value 'main'
    has to be assigned to @display
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213044

 vmdb/app/controllers/host_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 11 CFME Bot 2015-05-19 15:26:08 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4fb09de3875f2f519a9317d6f299efdf139b8ec9

commit 4fb09de3875f2f519a9317d6f299efdf139b8ec9
Merge: 31aaca4 2c74e9e
Author:     Dan Clarizio <dclarizi>
AuthorDate: Tue May 19 11:25:13 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Tue May 19 11:25:13 2015 -0400

    Merge branch 'bz1213044-firewall_rules_error' into '5.4.z'
    
    Fix setting of @display to 'main' when Host/Firewall Rules page
    
    When user wants to see Host/Security/Firewall Rules and previously
    displayed information changed the value of @display then value 'main'
    has to be assigned to @display
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213044
    
    See merge request !75

 vmdb/app/controllers/host_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 12 John Prause 2015-05-19 15:46:42 UTC
This will be in the 5.4.0.2 build.

Comment 13 Nandini Chandra 2015-05-22 21:29:00 UTC
Verified in 5.4.0.2

Comment 15 errata-xmlrpc 2015-06-16 12:58:57 UTC
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


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