Bug 1290788

Summary: undefined method `id' for nil:NilClass when trying to display all containers
Product: Red Hat CloudForms Management Engine Reporter: Federico Simoncelli <fsimonce>
Component: UI - OPSAssignee: Daniel Korn <dkorn>
Status: CLOSED WORKSFORME QA Contact: Avi Tal <atal>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: dajohnso, dclarizi, fsimonce, hkataria, jhardy, jprause, mpovolny, obarenbo, srevivo
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1295496 (view as bug list) Environment:
Last Closed: 2016-01-12 19:17:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1295496    
Attachments:
Description Flags
screenshot.png
none
production.log none

Description Federico Simoncelli 2015-12-11 13:11:56 UTC
Created attachment 1104649 [details]
screenshot.png

Description of problem:
Unknown failure when trying to display all containers.

Logs and screenshot in attachment.

How reproducible:
Rarely

Steps to Reproduce:
1. Unknown, but it's possible that is related to displaying containers during refreshes (containers removed)

Actual results:
A fatal error happens when trying to display all containers.

Expected results:
It should be possible to list all containers.

Additional info:
From the log it seems that a provider refresh was issued:

[----] I, [2015-12-05T15:22:31.310196 #14031:45798c]  INFO -- : Started POST "/ems_container/button/1?pressed=ems_container_refresh" for 127.0.0.1 at 2015-12-05 15:22:31 -0500

and right after that navigating to the container explorer (GET "/container/explorer"):

[----] I, [2015-12-05T15:22:36.109044 #14031:45798c]  INFO -- : Started GET "/container/explorer" for 127.0.0.1 at 2015-12-05 15:22:36 -0500
[----] I, [2015-12-05T15:22:36.110139 #14031:45798c]  INFO -- : Processing by ContainerController#explorer as HTML
[----] I, [2015-12-05T15:22:36.165944 #14031:45798c]  INFO -- : Rendered layouts/_flash_msg.html.haml (0.0ms)
[----] I, [2015-12-05T15:22:36.169932 #14031:45798c]  INFO -- : Rendered layouts/_perf_options.html.haml (3.8ms)
[----] I, [2015-12-05T15:22:36.170026 #14031:45798c]  INFO -- : Rendered layouts/_performance.html.haml (4.2ms)
[----] I, [2015-12-05T15:22:36.170078 #14031:45798c]  INFO -- : Rendered container/explorer.html.haml within layouts/application (4.4ms)
[----] F, [2015-12-05T15:22:36.170314 #14031:45798c] FATAL -- : Error caught: [NoMethodError] undefined method `id' for nil:NilClass
/var/www/miq/vmdb/app/views/layouts/_perf_options.html.haml:1:in `_app_views_layouts__perf_options_html_haml__1343843333716389368_145820160'

(more logs in attachment)

triggered calling _perf_options.html.haml probably because of bug 1286247, fixed with:

  https://github.com/ManageIQ/manageiq/pull/5647


I think that such fix can alleviate this bug but we should make sure that if the @record is nil (current container, or any other entity, is deleted all the possible views are not crashing)

Comment 2 Federico Simoncelli 2015-12-11 13:16:59 UTC
Created attachment 1104650 [details]
production.log

Comment 3 Daniel Korn 2016-01-11 12:39:29 UTC
I can't reproduce the failure. 
Might caused by the container controller refactor or different change related to containers Timelines/Utilization, if that's the case it should be OK.

Federico, Is there something you want me to do with this bug?

Comment 4 Federico Simoncelli 2016-01-11 15:19:39 UTC
(In reply to Daniel Korn from comment #3)
> Federico, Is there something you want me to do with this bug?

Let's wait and see if it reproduces (as we don't have clear steps to trigger this and check if it's fixed or not).

Comment 5 Dave Johnson 2016-01-12 19:17:14 UTC
Closing this until we see it again... if so, please reopen