Commit 15c8faf1 by Bach Dániel

Merge branch 'fix-shutdown-op' into 'master'

Fix shutdown op 

See merge request !280
parents 38b6f781 62f9e566
...@@ -90,6 +90,7 @@ class AbortableRemoteOperationMixin(object): ...@@ -90,6 +90,7 @@ class AbortableRemoteOperationMixin(object):
AbortableAsyncResult(remote.id).abort() AbortableAsyncResult(remote.id).abort()
raise humanize_exception(ugettext_noop( raise humanize_exception(ugettext_noop(
"Operation aborted by user."), e) "Operation aborted by user."), e)
raise TimeLimitExceeded()
class InstanceOperation(Operation): class InstanceOperation(Operation):
...@@ -722,8 +723,8 @@ class SaveAsTemplateOperation(InstanceOperation): ...@@ -722,8 +723,8 @@ class SaveAsTemplateOperation(InstanceOperation):
if with_shutdown: if with_shutdown:
try: try:
ShutdownOperation(self.instance).call(parent_activity=activity, self.instance.shutdown(parent_activity=activity,
user=user, task=task) user=user, task=task)
except Instance.WrongStateError: except Instance.WrongStateError:
pass pass
...@@ -803,7 +804,7 @@ class ShutdownOperation(AbortableRemoteOperationMixin, ...@@ -803,7 +804,7 @@ class ShutdownOperation(AbortableRemoteOperationMixin,
resultant_state = 'STOPPED' resultant_state = 'STOPPED'
task = vm_tasks.shutdown task = vm_tasks.shutdown
remote_queue = ("vm", "slow") remote_queue = ("vm", "slow")
remote_timeout = 120 remote_timeout = 180
def _operation(self, task): def _operation(self, task):
super(ShutdownOperation, self)._operation(task=task) super(ShutdownOperation, self)._operation(task=task)
......
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