Enable overwrite_existing by default

Change-Id: Ia0c845a6dbfa4eea4977e152625880d0eb97f6ca
Closes-Bug: #1420281
This commit is contained in:
Dmitry Tantsur 2015-03-06 14:59:21 +01:00
parent 98f781d90e
commit d5541bfe8f
4 changed files with 18 additions and 13 deletions

View File

@ -392,6 +392,8 @@ See `1.1.0 release tracking page`_ for details.
* ``identity_uri`` parameter should be set to Keystone admin endpoint.
* ``overwrite_existing`` is now enabled by default.
**Major Features**
* Default to only creating a port for the NIC that the ramdisk was PXE booted
@ -411,6 +413,9 @@ See `1.1.0 release tracking page`_ for details.
* Proper CLI tool implemented as a plugin for OpenStackClient_.
* The default value for ``overwrite_existing`` configuration option was
flipped, matching the default behavior for Ironic inspection.
**Other Changes**
* Experimental plugin ``edeploy`` to use with

View File

@ -47,10 +47,9 @@
; Amount of time in seconds, after which repeat clean up of timed out nodes
; and old nodes status information.
;clean_up_period = 60
; Whether to overwrite existing values in node database. In the future
; non-matching ports will be deleted as well. Setting this to true makes
; introspection a destructive operation, use with cautious.
;overwrite_existing = false
; Whether to overwrite existing values in node database.
; Disable this option to make introspection a non-destructive operation.
;overwrite_existing = true
; Whether to enable setting IPMI credentials during introspection. This is an
; experimental and not well tested feature, use at your own risk.
;enable_setting_ipmi_credentials = false

View File

@ -34,7 +34,7 @@ DEFAULTS = {
'timeout': '3600',
'node_status_keep_time': '604800',
'clean_up_period': '60',
'overwrite_existing': 'false',
'overwrite_existing': 'true',
'enable_setting_ipmi_credentials': 'false',
# HTTP settings
'listen_address': '0.0.0.0',

View File

@ -303,8 +303,10 @@ class TestProcessNode(BaseTest):
self.cached_node = node_cache.NodeInfo(uuid=self.uuid,
started_at=self.started_at)
self.patch_before = [
{'op': 'add', 'path': '/properties/cpus', 'value': '2'},
{'op': 'add', 'path': '/properties/memory_mb', 'value': '1024'},
{'path': '/properties/cpus', 'value': '2', 'op': 'add'},
{'path': '/properties/cpu_arch', 'value': 'x86_64', 'op': 'add'},
{'path': '/properties/memory_mb', 'value': '1024', 'op': 'add'},
{'path': '/properties/local_gb', 'value': '20', 'op': 'add'}
] # scheduler hook
self.patch_after = [
{'op': 'add', 'path': '/extra/newly_discovered', 'value': 'true'},
@ -354,13 +356,12 @@ class TestProcessNode(BaseTest):
key=lambda p: p.address))
finished_mock.assert_called_once_with(mock.ANY)
def test_overwrite(self, filters_mock, post_hook_mock):
conf.CONF.set('discoverd', 'overwrite_existing', 'true')
def test_overwrite_disabled(self, filters_mock, post_hook_mock):
conf.CONF.set('discoverd', 'overwrite_existing', 'false')
patch = [
{'path': '/properties/cpus', 'value': '2', 'op': 'add'},
{'path': '/properties/cpu_arch', 'value': 'x86_64', 'op': 'add'},
{'path': '/properties/memory_mb', 'value': '1024', 'op': 'add'},
{'path': '/properties/local_gb', 'value': '20', 'op': 'add'}]
{'op': 'add', 'path': '/properties/cpus', 'value': '2'},
{'op': 'add', 'path': '/properties/memory_mb', 'value': '1024'},
]
self.call()