Bug 1258651 - importing new nodes from instackenv will overwrite existing nodes capabilities
importing new nodes from instackenv will overwrite existing nodes capabilities
Product: Red Hat OpenStack
Classification: Red Hat
Component: os-cloud-config (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
high Severity unspecified
: y2
: 7.0 (Kilo)
Assigned To: Jay Dobies
Alexander Chuzhoy
: Reopened, Triaged
Depends On:
  Show dependency treegraph
Reported: 2015-08-31 18:45 EDT by bigswitch
Modified: 2015-12-21 11:55 EST (History)
7 users (show)

See Also:
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:
Last Closed: 2015-12-21 11:55:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description bigswitch 2015-08-31 18:45:54 EDT
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):

How reproducible:

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 14:17:33 EDT
this is a duplicate of bug 1241199.
Comment 4 bigswitch 2015-09-14 14:17:55 EDT

*** This bug has been marked as a duplicate of bug 1241199 ***
Comment 5 Brad P. Crochet 2015-09-16 20:33:39 EDT
This is not a duplicate. This is two completely different code paths.
Comment 6 Brad P. Crochet 2015-09-17 15:11:42 EDT
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 08:18:42 EDT
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 11:23:13 EDT
This appears to be fixed in os-cloud-config 0.2.10.
Comment 9 bigswitch 2015-11-02 13:51:33 EST
I am not seeing this issue with the GA code 
Comment 11 Alexander Chuzhoy 2015-11-30 16:33:52 EST


The reported issue doesn't reproduce.
Comment 13 errata-xmlrpc 2015-12-21 11:55:07 EST
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.