Commit d0dc3084 by Bach Dániel

Merge remote-tracking branch 'origin/master' into feature-fix-acls

parents af9bded6 0ac786b5
......@@ -827,7 +827,8 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
def migrate_vm(self, to_node, timeout=120):
queue_name = self.get_remote_queue_name('vm', 'slow')
return vm_tasks.migrate.apply_async(args=[self.vm_name,
to_node.host.hostname],
to_node.host.hostname,
True],
queue=queue_name
).get(timeout=timeout)
......@@ -864,7 +865,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
AbortableAsyncResult(remote.id).abort()
raise Exception("Shutdown aborted by user.")
def suspend_vm(self, timeout=60):
def suspend_vm(self, timeout=230):
queue_name = self.get_remote_queue_name('vm', 'slow')
return vm_tasks.sleep.apply_async(args=[self.vm_name,
self.mem_dump['path']],
......
......@@ -275,10 +275,6 @@ class MigrateOperation(InstanceOperation):
to_node = self.instance.select_node()
sa.result = to_node
# Shutdown networks
with activity.sub_activity('shutdown_net'):
self.instance.shutdown_net()
try:
with activity.sub_activity('migrate_vm'):
self.instance.migrate_vm(to_node=to_node, timeout=timeout)
......@@ -287,6 +283,10 @@ class MigrateOperation(InstanceOperation):
self.rollback(activity)
raise
# Shutdown networks
with activity.sub_activity('shutdown_net'):
self.instance.shutdown_net()
# Refresh node information
self.instance.node = to_node
self.instance.save()
......@@ -556,7 +556,7 @@ class SleepOperation(InstanceOperation):
def on_commit(self, activity):
activity.resultant_state = 'SUSPENDED'
def _operation(self, activity, timeout=60):
def _operation(self, activity, timeout=240):
# Destroy networks
with activity.sub_activity('shutdown_net'):
self.instance.shutdown_net()
......
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 sign in to comment