Bug 803647 - undefined method `name' for nil:NilClass when tried to change name of Cloud resource zone after getting the error "name already exsists"
undefined method `name' for nil:NilClass when tried to change name of Cloud r...
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-conductor (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Matt Wagner
wes hayutin
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-03-15 06:52 EDT by Rehana
Modified: 2014-08-17 18:27 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-15 18:58:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Rehana 2012-03-15 06:52:53 EDT
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.
    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.
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
Comment 1 Dave Johnson 2012-03-16 09:24:50 EDT
I reproduced this as well
Comment 2 Matt Wagner 2012-03-19 13:35:33 EDT
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 15:59:10 EDT
Pushed to master:

commit 8ac4f20c752d9b590a39f0e32e4aa8f380b48b3d
Author: Matt Wagner <matt.wagner@redhat.com>
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 17:30:37 EDT
8ac4f20c752d9b590a39f0e32e4aa8f380b48b3d is only on master as of this writing.
Comment 6 Hugh Brock 2012-04-18 13:51:35 EDT
Moving this to 1.0.z/1.1, it is not a blocker.
Comment 8 Rehana 2012-04-19 03:24:07 EDT
Observed that now this error is not displayed, and user was able to create a new CRZ.

verified on:

rpm -qa | grep aeolus
Comment 9 errata-xmlrpc 2012-05-15 18:58:27 EDT
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.


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