Commit 7f7b730a authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Start instance after creating snapshots for export

This restores functionality lost in commit 387794f8

. Found during
tests using QA scripts. An instance should be started after it
has been temporarily shutdown for an export.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent d51ae04c
......@@ -9229,6 +9229,17 @@ class LUExportInstance(LogicalUnit):
helper.CreateSnapshots()
try:
if (self.op.shutdown and instance.admin_up and
not self.remove_instance):
assert not activate_disks
feedback_fn("Starting instance %s" % instance.name)
result = self.rpc.call_instance_start(src_node, instance, None, None)
msg = result.fail_msg
if msg:
feedback_fn("Failed to start instance: %s" % msg)
_ShutdownInstanceDisks(self, instance)
raise errors.OpExecError("Could not start instance: %s" % msg)
if self.export_mode == constants.EXPORT_MODE_LOCAL:
(fin_resu, dresults) = helper.LocalExport(self.dst_node)
elif self.export_mode == constants.EXPORT_MODE_REMOTE:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment