Bug 1207313

Summary: UI: Cancel of Infra Provider add or edit causes exception: undefined local variable or method 'model'
Product: Red Hat CloudForms Management Engine Reporter: Dan Clarizio <dclarizi>
Component: UI - OPSAssignee: Aaron Patterson <apatters>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: hkataria, jhardy, mpovolny, nachandr, obarenbo
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:56:15 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:

Description Dan Clarizio 2015-03-30 16:47:19 UTC
Description of problem:
Exception when pressing Cancel button

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

How reproducible:
Add/Edit an Infra Provider, press Cancel

Additional info:
Suspect PR https://github.com/ManageIQ/manageiq/pull/2365

Stack trace:
[----] I, [2015-03-30T09:36:46.213020 #9514:8c5e88]  INFO -- : Started POST "/ems_infra/create/new?button=cancel" for 127.0.0.1 at 2015-03-30 09:36:46 -0700
[----] I, [2015-03-30T09:36:46.247212 #9514:8c5e88]  INFO -- : Processing by EmsInfraController#create as JS
[----] I, [2015-03-30T09:36:46.247318 #9514:8c5e88]  INFO -- :   Parameters: {"button"=>"cancel", "id"=>"new"}
[----] F, [2015-03-30T09:36:46.311766 #9514:8c5e88] FATAL -- : Error caught: [NameError] undefined local variable or method `model' for #<#<Class:0x0000000bbf6ae8>:0x0000000e3e9000>
/home/dclarizio/dev/manageiq/vmdb/app/controllers/ems_common.rb:166:in `block in create'

Comment 2 CFME Bot 2015-03-31 20:55:53 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/831dca9449de8539ba1e5fcafc92c8a60d46a12d

commit 831dca9449de8539ba1e5fcafc92c8a60d46a12d
Author:     Aaron Patterson <aaron.patterson>
AuthorDate: Mon Mar 30 10:42:16 2015 -0700
Commit:     Aaron Patterson <aaron.patterson>
CommitDate: Mon Mar 30 10:42:16 2015 -0700

    store the model type on the stack
    
    the render block is instance evaled, so it doesn't have access to the
    controller.  We store the model on the stack so that we don't need
    access to the instance in the render block.
    
    Fixes Bug 1207313
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1207313

 vmdb/app/controllers/ems_common.rb                 | 3 ++-
 vmdb/spec/controllers/ems_infra_controller_spec.rb | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

Comment 4 Nandini Chandra 2015-04-17 21:13:44 UTC
Verified in 5.4.0.0.19.20150410165622_ad23806

Comment 6 errata-xmlrpc 2015-06-16 12:56:15 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