Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #322 opened Oct 06, 2014 by Bach Dániel@bachdaniel 
  • Report abuse
  • New issue
Report abuse New issue

Fix operations

diff --git a/circle/vm/operations.py b/circle/vm/operations.py
index ffa5931..17d97a8 100644
--- a/circle/vm/operations.py
+++ b/circle/vm/operations.py
@@ -405,7 +405,7 @@ class DestroyOperation(InstanceOperation):
     required_perms = ()
     resultant_state = 'DESTROYED'

-    def _operation(self, activity):
+    def _operation(self, activity, system):
         # Destroy networks
         with activity.sub_activity(
                 'destroying_net',
@@ -415,7 +415,7 @@ class DestroyOperation(InstanceOperation):
             self.instance.destroy_net()

         if self.instance.node:
-            self.instance._delete_vm(parent_activity=activity)
+            self.instance._delete_vm(parent_activity=activity, system=system)

         # Destroy disks
         with activity.sub_activity(
@@ -425,7 +425,8 @@ class DestroyOperation(InstanceOperation):

         # Delete mem. dump if exists
         try:
-            self.instance._delete_mem_dump(parent_activity=activity)
+            self.instance._delete_mem_dump(parent_activity=activity,
+                                           system=system)
         except:
             pass

@@ -471,10 +472,11 @@ class MigrateOperation(RemoteInstanceOperation):
     task = vm_tasks.migrate
     remote_queue = ("vm", "slow")
     timeout = 600
+    remote_timeout = 500

     def _get_remote_args(self, to_node, **kwargs):
         return (super(MigrateOperation, self)._get_remote_args(**kwargs)
-                + [to_node.host.hostname, True])
+                + [to_node.host.hostname, False])
         # TODO handle non-live migration

     def rollback(self, activity):
@@ -779,12 +781,12 @@ class SleepOperation(InstanceOperation):
         else:
             activity.resultant_state = 'ERROR'

-    def _operation(self, activity):
+    def _operation(self, activity, system):
         with activity.sub_activity('shutdown_net',
                                    readable_name=ugettext_noop(
                                        "shutdown network")):
             self.instance.shutdown_net()
-        self.instance._suspend_vm(parent_activity=activity)
+        self.instance._suspend_vm(parent_activity=activity, system=system)
         self.instance.yield_node()

     @register_operation
@@ -794,6 +796,7 @@ class SleepOperation(InstanceOperation):
         task = vm_tasks.sleep
         remote_queue = ("vm", "slow")
         timeout = 600
+        remote_timeout = 600

         def _get_remote_args(self, **kwargs):
             return (super(SleepOperation.SuspendVmOperation, self)
@@ -847,6 +850,7 @@ class WakeUpOperation(InstanceOperation):
         task = vm_tasks.wake_up
         remote_queue = ("vm", "slow")
         timeout = 600
+        remote_timeout = 600

         def _get_remote_args(self, **kwargs):
             return (super(WakeUpOperation.WakeUpVmOperation, self)
  • Bach Dániel @bachdaniel

    Reassigned to @bachdaniel

    Oct 07, 2014

    Reassigned to @bachdaniel

    Reassigned to @bachdaniel
    Toggle commit list
  • Bach Dániel @bachdaniel

    mentioned in issue #329 (closed)

    Oct 07, 2014

    mentioned in issue #329 (closed)

    mentioned in issue #329
    Toggle commit list
  • Bach Dániel @bachdaniel

    Status changed to closed by commit 3d0afb

    Oct 07, 2014

    Status changed to closed by commit 3d0afb

    Status changed to closed by commit 3d0afb
    Toggle commit list
  • Write
  • Preview
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
Assignee
Assign to
October
Milestone
October
Assign milestone
Time tracking
None
Due date
No due date
1
Labels
critical
Assign labels
  • View labels
1
1 participant
Reference: circle/cloud#322