Bug 803647 - undefined method `name' for nil:NilClass when tried to change name of Cloud resource zone after getting the error "name already exsists"
Summary: undefined method `name' for nil:NilClass when tried to change name of Cloud r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
Assignee: Matt Wagner
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-15 10:52 UTC by Rehana
Modified: 2014-08-17 22:27 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 22:58:27 UTC
Embargoed:


Attachments (Terms of Use)
rails log (15.64 KB, application/octet-stream)
2012-03-15 10:52 UTC, Rehana
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0583 0 normal SHIPPED_LIVE new packages: aeolus-conductor 2012-05-15 22:31:59 UTC

Description Rehana 2012-03-15 10:52:53 UTC
Created attachment 570254 [details]
rails log

Description of problem:


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


How reproducible:


Steps to Reproduce:
1.Login ton conductor
2.go the monitor
3.try to create one more "Default" cloud resource zone
4.It will display message    
"Cloud Resource Zone creation failed.
Errors
    Header
    Name has already been taken"
5.Now try changing the name of cloud resource zone to "test" from the same page

 
Actual results:
It displays "Cloud Resource Zone creation failed.
Errors
undefined method `name' for nil:NilClass"


Expected results:
User should be allowed to change duplicate name to a new one during cloud resource zone creation.

Additional info:
Attached rails log.

rpm -qa | grep aeolus
aeolus-configure-2.5.0-18.el6.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-aeolus-cli-0.3.0-14.el6.noarch
aeolus-conductor-0.8.0-43.el6.noarch
aeolus-conductor-doc-0.8.0-43.el6.noarch
aeolus-conductor-daemons-0.8.0-43.el6.noarch
aeolus-all-0.8.0-43.el6.noarch

Comment 1 Dave Johnson 2012-03-16 13:24:50 UTC
I reproduced this as well

Comment 2 Matt Wagner 2012-03-19 17:35:33 UTC
I think what's happening is that we're dropping the pool_family_id when we re-render the form after the error, so @pool.pool_family is nil. I'm going to see if we can carry this value through.

Comment 4 Matt Wagner 2012-03-19 19:59:10 UTC
Pushed to master:

commit 8ac4f20c752d9b590a39f0e32e4aa8f380b48b3d
Author: Matt Wagner <matt.wagner>
Date:   Mon Mar 19 13:49:01 2012 -0400

    BZ 803647 - Persist pool[pool_family_id] on failure during creation
    
    If you hit a validation error while creating a pool, we need to keep
    your pool_family_id attribute or else you will receive an exception
    when you try to save a second time, because pool_family_id is nil.

Comment 5 Steve Linabery 2012-04-12 21:30:37 UTC
8ac4f20c752d9b590a39f0e32e4aa8f380b48b3d is only on master as of this writing.

Comment 6 Hugh Brock 2012-04-18 17:51:35 UTC
Moving this to 1.0.z/1.1, it is not a blocker.

Comment 8 Rehana 2012-04-19 07:24:07 UTC
Observed that now this error is not displayed, and user was able to create a new CRZ.

verified on:

rpm -qa | grep aeolus
aeolus-configure-2.5.3-1.el6.noarch
rubygem-aeolus-cli-0.3.1-1.el6.noarch
aeolus-conductor-doc-0.8.12-1.el6_2.noarch
aeolus-conductor-daemons-0.8.12-1.el6_2.noarch
aeolus-all-0.8.12-1.el6_2.noarch
aeolus-conductor-0.8.12-1.el6_2.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch

Comment 9 errata-xmlrpc 2012-05-15 22:58:27 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.

http://rhn.redhat.com/errata/RHEA-2012-0583.html


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