manager.py (nova-22.0.0) | : | manager.py (nova-22.0.1) | ||
---|---|---|---|---|
skipping to change at line 3319 | skipping to change at line 3319 | |||
@messaging.expected_exceptions(exception.PreserveEphemeralNotSupported, | @messaging.expected_exceptions(exception.PreserveEphemeralNotSupported, | |||
exception.BuildAbortException) | exception.BuildAbortException) | |||
@wrap_exception() | @wrap_exception() | |||
@reverts_task_state | @reverts_task_state | |||
@wrap_instance_event(prefix='compute') | @wrap_instance_event(prefix='compute') | |||
@wrap_instance_fault | @wrap_instance_fault | |||
def rebuild_instance(self, context, instance, orig_image_ref, image_ref, | def rebuild_instance(self, context, instance, orig_image_ref, image_ref, | |||
injected_files, new_pass, orig_sys_metadata, | injected_files, new_pass, orig_sys_metadata, | |||
bdms, recreate, on_shared_storage, | bdms, recreate, on_shared_storage, | |||
preserve_ephemeral, migration, | preserve_ephemeral, migration, | |||
scheduled_node, limits, request_spec, accel_uuids): | scheduled_node, limits, request_spec, | |||
accel_uuids=None): | ||||
"""Destroy and re-make this instance. | """Destroy and re-make this instance. | |||
A 'rebuild' effectively purges all existing data from the system and | A 'rebuild' effectively purges all existing data from the system and | |||
remakes the VM with given 'metadata' and 'personalities'. | remakes the VM with given 'metadata' and 'personalities'. | |||
:param context: `nova.RequestContext` object | :param context: `nova.RequestContext` object | |||
:param instance: Instance object | :param instance: Instance object | |||
:param orig_image_ref: Original image_ref before rebuild | :param orig_image_ref: Original image_ref before rebuild | |||
:param image_ref: New image_ref for rebuild | :param image_ref: New image_ref for rebuild | |||
:param injected_files: Files to inject | :param injected_files: Files to inject | |||
skipping to change at line 3350 | skipping to change at line 3351 | |||
:param preserve_ephemeral: True if the default ephemeral storage | :param preserve_ephemeral: True if the default ephemeral storage | |||
partition must be preserved on rebuild | partition must be preserved on rebuild | |||
:param migration: a Migration object if one was created for this | :param migration: a Migration object if one was created for this | |||
rebuild operation (if it's a part of evacuate) | rebuild operation (if it's a part of evacuate) | |||
:param scheduled_node: A node of the host chosen by the scheduler. If a | :param scheduled_node: A node of the host chosen by the scheduler. If a | |||
host was specified by the user, this will be | host was specified by the user, this will be | |||
None | None | |||
:param limits: Overcommit limits set by the scheduler. If a host was | :param limits: Overcommit limits set by the scheduler. If a host was | |||
specified by the user, this will be None | specified by the user, this will be None | |||
:param request_spec: a RequestSpec object used to schedule the instance | :param request_spec: a RequestSpec object used to schedule the instance | |||
:param accel_uuids: a list of cyborg ARQ uuids. | :param accel_uuids: a list of cyborg ARQ uuids or None if the RPC API | |||
is <=5.11 | ||||
""" | """ | |||
# recreate=True means the instance is being evacuated from a failed | # recreate=True means the instance is being evacuated from a failed | |||
# host to a new destination host (this host). The 'recreate' variable | # host to a new destination host (this host). The 'recreate' variable | |||
# name is confusing, so rename it to evacuate here at the top, which | # name is confusing, so rename it to evacuate here at the top, which | |||
# is simpler than renaming a parameter in an RPC versioned method. | # is simpler than renaming a parameter in an RPC versioned method. | |||
evacuate = recreate | evacuate = recreate | |||
context = context.elevated() | context = context.elevated() | |||
if evacuate: | if evacuate: | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added |