Bug 1254666

Summary: Error:"You cannot call create unless the parent is saved [host/create]" in add new host
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: medium Docs Contact:
Priority: high    
Version: 5.4.0CC: akarol, cpelland, dajohnso, dclarizi, hkataria, jhardy, mfeifer, mhradil, mpovolny, obarenbo, rananda
Target Milestone: GAKeywords: ZStream
Target Release: 5.4.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.4.2.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1232281 Environment:
Last Closed: 2015-09-09 12:26:57 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: 1232281    
Bug Blocks:    

Comment 2 CFME Bot 2015-08-19 21:18:17 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=17c0c6812e445647a9bc63c2da174296d796c096

commit 17c0c6812e445647a9bc63c2da174296d796c096
Merge: 4afdad4 fa5ada3
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Aug 19 11:14:37 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Aug 19 11:14:37 2015 -0400

    Merge branch 'bz1254666' into '5.4.z'
    
    Edit host/create: Set host custom attributes only when *not* validating
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1254666
    
    Cherry pick is not quite clean:
    
    ```
    5.4.z:    host.hostname = @edit[:new][:hostname]        # (before now)
    upstream: host.hostname = @edit[:new][:hostname].strip	# (before f4eebf69)
    now:      host.hostname = @edit[:new][:hostname].to_s.strip
    ```
    
    And a `set_record_vars` test in `host_controller_spec` is missing (was after the test introduced in the last commit).
    
    See merge request !230

 vmdb/app/controllers/host_controller.rb       |  5 ++---
 vmdb/spec/controllers/host_controller_spec.rb | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

Comment 3 CFME Bot 2015-08-19 22:07:54 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=17c0c6812e445647a9bc63c2da174296d796c096

commit 17c0c6812e445647a9bc63c2da174296d796c096
Merge: 4afdad4 fa5ada3
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Aug 19 11:14:37 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Aug 19 11:14:37 2015 -0400

    Merge branch 'bz1254666' into '5.4.z'
    
    Edit host/create: Set host custom attributes only when *not* validating
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1254666
    
    Cherry pick is not quite clean:
    
    ```
    5.4.z:    host.hostname = @edit[:new][:hostname]        # (before now)
    upstream: host.hostname = @edit[:new][:hostname].strip	# (before f4eebf69)
    now:      host.hostname = @edit[:new][:hostname].to_s.strip
    ```
    
    And a `set_record_vars` test in `host_controller_spec` is missing (was after the test introduced in the last commit).
    
    See merge request !230

 vmdb/app/controllers/host_controller.rb       |  5 ++---
 vmdb/spec/controllers/host_controller_spec.rb | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

Comment 4 CFME Bot 2015-08-19 22:28:23 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=17c0c6812e445647a9bc63c2da174296d796c096

commit 17c0c6812e445647a9bc63c2da174296d796c096
Merge: 4afdad4 fa5ada3
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Aug 19 11:14:37 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Aug 19 11:14:37 2015 -0400

    Merge branch 'bz1254666' into '5.4.z'
    
    Edit host/create: Set host custom attributes only when *not* validating
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1254666
    
    Cherry pick is not quite clean:
    
    ```
    5.4.z:    host.hostname = @edit[:new][:hostname]        # (before now)
    upstream: host.hostname = @edit[:new][:hostname].strip	# (before f4eebf69)
    now:      host.hostname = @edit[:new][:hostname].to_s.strip
    ```
    
    And a `set_record_vars` test in `host_controller_spec` is missing (was after the test introduced in the last commit).
    
    See merge request !230

 vmdb/app/controllers/host_controller.rb       |  5 ++---
 vmdb/spec/controllers/host_controller_spec.rb | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

Comment 5 CFME Bot 2015-08-19 23:02:06 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=17c0c6812e445647a9bc63c2da174296d796c096

commit 17c0c6812e445647a9bc63c2da174296d796c096
Merge: 4afdad4 fa5ada3
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Aug 19 11:14:37 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Aug 19 11:14:37 2015 -0400

    Merge branch 'bz1254666' into '5.4.z'
    
    Edit host/create: Set host custom attributes only when *not* validating
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1254666
    
    Cherry pick is not quite clean:
    
    ```
    5.4.z:    host.hostname = @edit[:new][:hostname]        # (before now)
    upstream: host.hostname = @edit[:new][:hostname].strip	# (before f4eebf69)
    now:      host.hostname = @edit[:new][:hostname].to_s.strip
    ```
    
    And a `set_record_vars` test in `host_controller_spec` is missing (was after the test introduced in the last commit).
    
    See merge request !230

 vmdb/app/controllers/host_controller.rb       |  5 ++---
 vmdb/spec/controllers/host_controller_spec.rb | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

Comment 6 CFME Bot 2015-08-20 00:31:42 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=17c0c6812e445647a9bc63c2da174296d796c096

commit 17c0c6812e445647a9bc63c2da174296d796c096
Merge: 4afdad4 fa5ada3
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Aug 19 11:14:37 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Aug 19 11:14:37 2015 -0400

    Merge branch 'bz1254666' into '5.4.z'
    
    Edit host/create: Set host custom attributes only when *not* validating
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1254666
    
    Cherry pick is not quite clean:
    
    ```
    5.4.z:    host.hostname = @edit[:new][:hostname]        # (before now)
    upstream: host.hostname = @edit[:new][:hostname].strip	# (before f4eebf69)
    now:      host.hostname = @edit[:new][:hostname].to_s.strip
    ```
    
    And a `set_record_vars` test in `host_controller_spec` is missing (was after the test introduced in the last commit).
    
    See merge request !230

 vmdb/app/controllers/host_controller.rb       |  5 ++---
 vmdb/spec/controllers/host_controller_spec.rb | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)

Comment 8 Ramesh A 2015-08-24 10:37:36 UTC
Good to go.  Verified and working fine in 5.4.2.0.20150820153254_83e434d

Comment 10 errata-xmlrpc 2015-09-09 12:26: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-1744.html