Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1258651

Summary: importing new nodes from instackenv will overwrite existing nodes capabilities
Product: Red Hat OpenStack Reporter: bigswitch <rhosp-bugs-internal>
Component: os-cloud-configAssignee: Jay Dobies <jason.dobies>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.0 (Kilo)CC: brad, dmacpher, jcoufal, mburns, ohochman, rhel-osp-director-maint, yeylon
Target Milestone: y2Keywords: Reopened, Triaged
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: os-cloud-config-0.2.8-9.el7ost Doc Type: Bug Fix
Doc Text:
When registering new nodes and using the existing JSON file to store their info, the director would overwrite the capabilities of existing nodes. This fix skips the existing nodes. Now users can add new nodes to the original JSON file without erasing capabilities for existing nodes.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-21 16:55:07 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 bigswitch 2015-08-31 22:45:54 UTC
Description of problem:
when import new nodes from a new instackenv.json file, it will overwrite the capabilities field in existing nodes. 

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

How reproducible:
100%

Steps to Reproduce:
1. create a new instackenv.json file with new nodes information
2. import using openstack baremetal import --json instackenv.json
3. notice existing nodes capabilities field are overwritten. roles such as controller and compute is removed

Actual results:

Expected results:
should not disturb existing node information

Additional info:

Comment 3 bigswitch 2015-09-14 18:17:33 UTC
hi,
this is a duplicate of bug 1241199.

Comment 4 bigswitch 2015-09-14 18:17:55 UTC

*** This bug has been marked as a duplicate of bug 1241199 ***

Comment 5 Brad P. Crochet 2015-09-17 00:33:39 UTC
This is not a duplicate. This is two completely different code paths.

Comment 6 Brad P. Crochet 2015-09-17 19:11:42 UTC
A simple workaround is to use a new file for new systems. Do not add new systems to the old json file.

I will do some investigation as to whether a code fix is appropriate here. But it seems that documentation is the best fix.

Comment 7 Jaromir Coufal 2015-10-20 12:18:42 UTC
So, code change might be needed - if the file contains a node which already exists, tell user that the file contains already existing nodes which were already registered, so no action will be performed on these.

Comment 8 Brad P. Crochet 2015-10-29 15:23:13 UTC
This appears to be fixed in os-cloud-config 0.2.10.

Comment 9 bigswitch 2015-11-02 18:51:33 UTC
hi
I am not seeing this issue with the GA code 
FYI

Comment 11 Alexander Chuzhoy 2015-11-30 21:33:52 UTC
Verified:

Environment:
os-cloud-config-0.2.8-9.el7ost.noarch

The reported issue doesn't reproduce.

Comment 13 errata-xmlrpc 2015-12-21 16:55:07 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://access.redhat.com/errata/RHBA-2015:2651