Merge "Address final comments of edf532db91"
This commit is contained in:
commit
3b501f3e3a
@ -581,11 +581,11 @@
|
||||
# the check entirely. (integer value)
|
||||
#sync_local_state_interval=180
|
||||
|
||||
# Whether upload the config drive to Swift. (boolean value)
|
||||
# Whether to upload the config drive to Swift. (boolean value)
|
||||
#configdrive_use_swift=false
|
||||
|
||||
# The Swift config drive container to store data. (string
|
||||
# value)
|
||||
# Name of the Swift container to store config drive data. Used
|
||||
# when configdrive_use_swift is True. (string value)
|
||||
#configdrive_swift_container=ironic_configdrive_container
|
||||
|
||||
|
||||
|
@ -156,10 +156,11 @@ conductor_opts = [
|
||||
'the check entirely.'),
|
||||
cfg.BoolOpt('configdrive_use_swift',
|
||||
default=False,
|
||||
help='Whether upload the config drive to Swift.'),
|
||||
help='Whether to upload the config drive to Swift.'),
|
||||
cfg.StrOpt('configdrive_swift_container',
|
||||
default='ironic_configdrive_container',
|
||||
help='The Swift config drive container to store data.'),
|
||||
help='Name of the Swift container to store config drive '
|
||||
'data. Used when configdrive_use_swift is True.'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
@ -1366,9 +1367,9 @@ def _get_configdrive_obj_name(node):
|
||||
def _store_configdrive(node, configdrive):
|
||||
"""Handle the storage of the config drive.
|
||||
|
||||
Whether update the Node's instance_info with the config driver
|
||||
directly or upload it to Swift first and update the Node with an
|
||||
temp URL pointing to the Swift object.
|
||||
If configured, the config drive data are uploaded to Swift. The Node's
|
||||
instance_info is updated to include either the temporary Swift URL
|
||||
from the upload, or if no upload, the actual config drive data.
|
||||
|
||||
:param node: an Ironic node object.
|
||||
:param configdrive: A gzipped and base64 encoded configdrive.
|
||||
@ -1421,7 +1422,7 @@ def do_node_deploy(task, conductor_id, configdrive=None):
|
||||
_LW('Error while uploading the configdrive for '
|
||||
'%(node)s to Swift'),
|
||||
_('Failed to upload the configdrive to Swift. '
|
||||
'Error %s'))
|
||||
'Error: %s'))
|
||||
|
||||
try:
|
||||
task.driver.deploy.prepare(task)
|
||||
|
@ -268,7 +268,7 @@ class ConductorAPI(object):
|
||||
:param context: request context.
|
||||
:param node_id: node id or uuid.
|
||||
:param rebuild: True if this is a rebuild request.
|
||||
:param configdrive: Optional. A gzipped and base64 encoded configdrive.
|
||||
:param configdrive: A gzipped and base64 encoded configdrive.
|
||||
:param topic: RPC topic. Defaults to self.topic.
|
||||
:raises: InstanceDeployFailure
|
||||
:raises: InvalidParameterValue if validation fails
|
||||
|
@ -2926,6 +2926,6 @@ class StoreConfigDriveTestCase(tests_base.TestCase):
|
||||
mock_swift.return_value.create_object.assert_called_once_with(
|
||||
container_name, expected_obj_name, mock.ANY,
|
||||
object_headers=expected_obj_header)
|
||||
mock_swift.return_value.get_temp_url(container_name,
|
||||
expected_obj_name, timeout)
|
||||
mock_swift.return_value.get_temp_url.assert_called_once_with(
|
||||
container_name, expected_obj_name, timeout)
|
||||
self.assertEqual(expected_instance_info, self.node.instance_info)
|
||||
|
Loading…
x
Reference in New Issue
Block a user