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
Merged
Merge request !220 opened Sep 25, 2014 by Őry Máté@orymate 
  • Report abuse
Report abuse

Sub- and Remote Operations

closes #304 (closed)

requires vmdriver!4 (merged)

  • Discussion 9
  • Commits 28
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Guba Sándor
    @gubasandor started a discussion on the diff Sep 29, 2014
    circle/vm/operations.py
    44 45 )
    45 from .tasks import agent_tasks, local_agent_tasks
    46 from .tasks import agent_tasks, local_agent_tasks, vm_tasks
    46 47  
    47 48 from dashboard.store_api import Store, NoStoreException
    49 from storage.tasks import storage_tasks
    48 50  
    49 51 logger = getLogger(__name__)
    50 52  
    51 53  
    54 class RemoteOperationMixin(object):
    55
    56 remote_timeout = 30
    57
    58 def _operation(self, **kwargs):
    59 args = self._get_remote_args(**kwargs),
    • Guba Sándor @gubasandor commented Sep 29, 2014
      Owner

      Remove comma fixed

      Edited Oct 01, 2014
      ~~Remove comma~~ fixed
    Please register or sign in to reply
  • Guba Sándor
    @gubasandor started a discussion on an old version of the diff Sep 29, 2014
    Last updated by Bach Dániel Oct 01, 2014
    circle/vm/operations.py
    116 152 return False
    117 153  
    118 154  
    155 class RemoteInstanceOperation(RemoteOperationMixin, InstanceOperation):
    156
    157 remote_queue = ('vm', 'fast')
    158 # activity_code_suffix = property(lambda self: self.id or self.task.name)
    • Guba Sándor @gubasandor commented Sep 29, 2014
      Owner

      remove this line

      remove this line
    • Bach Dániel @bachdaniel commented Oct 01, 2014
      Owner

      add get_activity_code_suffix(cls)

      add get_activity_code_suffix(cls)
    Please register or sign in to reply
  • Guba Sándor
    @gubasandor started a discussion on an old version of the diff Sep 29, 2014
    circle/vm/operations.py
    321 351 except:
    322 352 pass
    323 353  
    324 # Resume vm
    325 with activity.sub_activity(
    326 'booting', readable_name=ugettext_noop(
    327 "boot virtual machine")):
    328 self.instance.resume_vm(timeout=timeout)
    354 self.instance._resume_vm(parent_activity=activity)
    329 355  
    330 356 if self.instance.has_agent:
    331 357 activity.sub_activity('os_boot', readable_name=ugettext_noop(
    332 358 "wait operating system loading"), interruptible=True)
    333 359  
    360 @register_operation
    361 class DeployVmOperation(SubOperationMixin, InstanceOperation):
    • Guba Sándor @gubasandor commented Sep 29, 2014
      Owner

      RemoteInstanceOperation?

      RemoteInstanceOperation?
    Please register or sign in to reply
  • Guba Sándor
    @gubasandor started a discussion on the diff Sep 29, 2014
    circle/vm/operations.py
    324 # Resume vm
    325 with activity.sub_activity(
    326 'booting', readable_name=ugettext_noop(
    327 "boot virtual machine")):
    328 self.instance.resume_vm(timeout=timeout)
    354 self.instance._resume_vm(parent_activity=activity)
    329 355  
    330 356 if self.instance.has_agent:
    331 357 activity.sub_activity('os_boot', readable_name=ugettext_noop(
    332 358 "wait operating system loading"), interruptible=True)
    333 359  
    360 @register_operation
    361 class DeployVmOperation(SubOperationMixin, InstanceOperation):
    362 id = "_deploy_vm"
    363 name = _("deploy vm")
    364 description = _("Deploy all associated disks.")
    • Guba Sándor @gubasandor commented Sep 29, 2014
      Owner

      Deploy vm? fixed

      Edited Oct 01, 2014
      ~~Deploy vm?~~ fixed
    Please register or sign in to reply
  • Guba Sándor
    @gubasandor started a discussion on an old version of the diff Sep 29, 2014
    circle/vm/operations.py
    827 918 host_cls = Node
    828 919 online_required = True
    829 920 superuser_required = True
    921 activity_code_suffix = property(lambda self: self.id)
    • Guba Sándor @gubasandor commented Sep 29, 2014
      Owner

      Remove

      Edited Oct 02, 2014
      ~~Remove~~
    Please register or sign in to reply
  • Őry Máté @orymate

    Added 2 new commits:

    • a89d41d2 - vm: fix tests
    • 19cdda94 - vm: fix typos
    Oct 01, 2014

    Added 2 new commits:

    • a89d41d2 - vm: fix tests
    • 19cdda94 - vm: fix typos
    Added 2 new commits: * a89d41d210a - vm: fix tests * 19cdda94f72 - vm: fix typos
    Toggle commit list
  • Bach Dániel @bachdaniel

    Added 35 new commits:

    • 8b6f79aa - dashboard: show node on vm
    • 077f3ce8 - dashboard: fix vm detail node info
    • bf6f89c8 - dashboard: add margin after vm connect button
    • 4f111175 - dashboard: handle operator/owner perms in vm detail
    • 9d1a11ca - dashboard: add exact time of suspend and delete on vm detail page
    • e445a532 - vm: make Instance.allocate_node smarter
    • 2a45d4dc - vm: fix tests to match new allocate_node
    • 91be5c4c - dashboard: fix perm of profile view
    • dc674ca8 - hotfix return in-middle of the function
    • 1e4c94ea - dashboard: add reset_node option to VmStateChangeForm
    • bff353e8 - vm: add redeploy operation
    • a431c8f2 - vm: add ResetNodeOperation
    • 9aec9ec4 - Merge branch 'issue-306' into 'master'
    • aecadda0 - dashboard: use correct profile.pk in GroupAclUpdateView
    • 2cddba6e - dashboard: fix tests
    • bc48c0ba - Merge remote-tracking branch 'origin/master' into issue-289
    • fed6ed40 - Merge branch 'issue-289' into 'master'
    • a1403945 - dashboard: add memory to vm list
    • f0929ad9 - Merge branch 'fix-groupaclupdate'
    • a3ceda07 - Merge branch 'feature-redeploy' into 'master'
    • 5c50b57b - vm: fix issue #315 (closed) (TypeError: unsupported operand type(s) for +: 'long' and 'unicode')
    • f5f2eb9c - dashboard: handle SchedulerError in MigrateView
    • 8b724e09 - Merge branch 'issue-296' into 'master'
    • ed8ce9ce - requirements: bump sizefield version
    • 687fccd6 - dashboard: add a little margin to disk resize button
    • 2ba806df - dashboard: client cookie timer was missing an 1000 multiplication
    • 803c7821 - vm: fix MigrateOperation (Unhandled exception: 'NoneType' object has no attribute 'host')
    • 469417cd - dashboard: log scheduler errors in VmMigrateView
    • 250c4b3d - network: show all hosts in vlan list table
    • a30840bc - vm: add MigrateOperation test
    • 83f7bd1e - Merge branch 'issue-310' into 'master'
    • b841385c - vm: fix flake8 warning
    • f69d7306 - Merge branch 'fix-http500' into 'master'
    • 9f91f3a7 - Merge branch 'clientCorrect' into 'master'
    • e11fffa5 - Merge remote-tracking branch 'origin/master' into feature-vm-tasks
    Oct 01, 2014

    Added 35 new commits:

    • 8b6f79aa - dashboard: show node on vm
    • 077f3ce8 - dashboard: fix vm detail node info
    • bf6f89c8 - dashboard: add margin after vm connect button
    • 4f111175 - dashboard: handle operator/owner perms in vm detail
    • 9d1a11ca - dashboard: add exact time of suspend and delete on vm detail page
    • e445a532 - vm: make Instance.allocate_node smarter
    • 2a45d4dc - vm: fix tests to match new allocate_node
    • 91be5c4c - dashboard: fix perm of profile view
    • dc674ca8 - hotfix return in-middle of the function
    • 1e4c94ea - dashboard: add reset_node option to VmStateChangeForm
    • bff353e8 - vm: add redeploy operation
    • a431c8f2 - vm: add ResetNodeOperation
    • 9aec9ec4 - Merge branch 'issue-306' into 'master'
    • aecadda0 - dashboard: use correct profile.pk in GroupAclUpdateView
    • 2cddba6e - dashboard: fix tests
    • bc48c0ba - Merge remote-tracking branch 'origin/master' into issue-289
    • fed6ed40 - Merge branch 'issue-289' into 'master'
    • a1403945 - dashboard: add memory to vm list
    • f0929ad9 - Merge branch 'fix-groupaclupdate'
    • a3ceda07 - Merge branch 'feature-redeploy' into 'master'
    • 5c50b57b - vm: fix issue #315 (closed) (TypeError: unsupported operand type(s) for +: 'long' and 'unicode')
    • f5f2eb9c - dashboard: handle SchedulerError in MigrateView
    • 8b724e09 - Merge branch 'issue-296' into 'master'
    • ed8ce9ce - requirements: bump sizefield version
    • 687fccd6 - dashboard: add a little margin to disk resize button
    • 2ba806df - dashboard: client cookie timer was missing an 1000 multiplication
    • 803c7821 - vm: fix MigrateOperation (Unhandled exception: 'NoneType' object has no attribute 'host')
    • 469417cd - dashboard: log scheduler errors in VmMigrateView
    • 250c4b3d - network: show all hosts in vlan list table
    • a30840bc - vm: add MigrateOperation test
    • 83f7bd1e - Merge branch 'issue-310' into 'master'
    • b841385c - vm: fix flake8 warning
    • f69d7306 - Merge branch 'fix-http500' into 'master'
    • 9f91f3a7 - Merge branch 'clientCorrect' into 'master'
    • e11fffa5 - Merge remote-tracking branch 'origin/master' into feature-vm-tasks
    Added 35 new commits: * 8b6f79aa298 - dashboard: show node on vm * 077f3ce88b8 - dashboard: fix vm detail node info * bf6f89c848e - dashboard: add margin after vm connect button * 4f1111754ae - dashboard: handle operator/owner perms in vm detail * 9d1a11ca721 - dashboard: add exact time of suspend and delete on vm detail page * e445a5328e6 - vm: make Instance.allocate_node smarter * 2a45d4dc9a6 - vm: fix tests to match new allocate_node * 91be5c4c267 - dashboard: fix perm of profile view * dc674ca86ff - hotfix return in-middle of the function * 1e4c94eac5d - dashboard: add reset_node option to VmStateChangeForm * bff353e8224 - vm: add redeploy operation * a431c8f23bc - vm: add ResetNodeOperation * 9aec9ec4ddb - Merge branch 'issue-306' into 'master' * aecadda0292 - dashboard: use correct profile.pk in GroupAclUpdateView * 2cddba6e74e - dashboard: fix tests * bc48c0ba3b1 - Merge remote-tracking branch 'origin/master' into issue-289 * fed6ed40e7e - Merge branch 'issue-289' into 'master' * a1403945a26 - dashboard: add memory to vm list * f0929ad9a9e - Merge branch 'fix-groupaclupdate' * a3ceda07084 - Merge branch 'feature-redeploy' into 'master' * 5c50b57b150 - vm: fix issue #315 (TypeError: unsupported operand type(s) for +: 'long' and 'unicode') * f5f2eb9c488 - dashboard: handle SchedulerError in MigrateView * 8b724e09ec0 - Merge branch 'issue-296' into 'master' * ed8ce9ce290 - requirements: bump sizefield version * 687fccd6b72 - dashboard: add a little margin to disk resize button * 2ba806dfdb8 - dashboard: client cookie timer was missing an 1000 multiplication * 803c78217d6 - vm: fix MigrateOperation (Unhandled exception: 'NoneType' object has no attribute 'host') * 469417cd837 - dashboard: log scheduler errors in VmMigrateView * 250c4b3dd98 - network: show all hosts in vlan list table * a30840bcf65 - vm: add MigrateOperation test * 83f7bd1ebf5 - Merge branch 'issue-310' into 'master' * b841385c363 - vm: fix flake8 warning * f69d73067cf - Merge branch 'fix-http500' into 'master' * 9f91f3a7688 - Merge branch 'clientCorrect' into 'master' * e11fffa5cd3 - Merge remote-tracking branch 'origin/master' into feature-vm-tasks
    Toggle commit list
  • Őry Máté @orymate commented Oct 01, 2014
    Owner

    make allocate_node an activity

    make allocate_node an activity
  • Bach Dániel @bachdaniel

    Added 3 new commits:

    • b14ff508 - vm: fix instance.allocate_node calls
    • 980138db - vm: fix merge errors
    • 17f1b359 - vm: fix MigrateOp test
    Oct 01, 2014

    Added 3 new commits:

    • b14ff508 - vm: fix instance.allocate_node calls
    • 980138db - vm: fix merge errors
    • 17f1b359 - vm: fix MigrateOp test
    Added 3 new commits: * b14ff508278 - vm: fix instance.allocate_node calls * 980138db490 - vm: fix merge errors * 17f1b359c6a - vm: fix MigrateOp test
    Toggle commit list
  • Őry Máté @orymate

    Added 1 new commit:

    • 2f018f5a - common: refactor Operation.activity_code_suffix to method
    Oct 02, 2014

    Added 1 new commit:

    • 2f018f5a - common: refactor Operation.activity_code_suffix to method
    Added 1 new commit: * 2f018f5a2fa - common: refactor Operation.activity_code_suffix to method
    Toggle commit list
  • Őry Máté @orymate

    Added 1 new commit:

    • fd823667 - common: default SubOperationMixin to no required_perms
    Oct 02, 2014

    Added 1 new commit:

    • fd823667 - common: default SubOperationMixin to no required_perms
    Added 1 new commit: * fd82366776b - common: default SubOperationMixin to no required_perms
    Toggle commit list
  • Őry Máté @orymate

    Added 2 new commits:

    • d674c053 - vm: fix DeployOperation
    • 81c32d0e - vm: register ResumeVmOperation
    Oct 02, 2014

    Added 2 new commits:

    • d674c053 - vm: fix DeployOperation
    • 81c32d0e - vm: register ResumeVmOperation
    Added 2 new commits: * d674c05391a - vm: fix DeployOperation * 81c32d0e0c3 - vm: register ResumeVmOperation
    Toggle commit list
  • Őry Máté @orymate

    Added 2 new commits:

    • 1bafed24 - vm: make DeleteVmOperation a SubOperation
    • af2cfb2c - vm: fix SuspendVmOperation's task name
    Oct 02, 2014

    Added 2 new commits:

    • 1bafed24 - vm: make DeleteVmOperation a SubOperation
    • af2cfb2c - vm: fix SuspendVmOperation's task name
    Added 2 new commits: * 1bafed24d9f - vm: make DeleteVmOperation a SubOperation * af2cfb2c425 - vm: fix SuspendVmOperation's task name
    Toggle commit list
  • Őry Máté @orymate

    Added 1 new commit:

    • 438460ef - vm: fix ops in different models but the same name
    Oct 02, 2014

    Added 1 new commit:

    • 438460ef - vm: fix ops in different models but the same name
    Added 1 new commit: * 438460efd71 - vm: fix ops in different models but the same name
    Toggle commit list
  • Bach Dániel @bachdaniel

    Added 1 new commit:

    • ae821278 - vm: fix suboperation call in AddInterfaceOperation
    Oct 02, 2014

    Added 1 new commit:

    • ae821278 - vm: fix suboperation call in AddInterfaceOperation
    Added 1 new commit: * ae821278579 - vm: fix suboperation call in AddInterfaceOperation
    Toggle commit list
  • Dudás Ádám
    @siliconbrain started a discussion on an old version of the diff Oct 02, 2014
    circle/vm/operations.py
    61 args=args, queue=self._get_remote_queue()
    62 ).get(timeout=self.remote_timeout)
    63
    64 def check_precond(self):
    65 super(RemoteOperationMixin, self).check_precond()
    66 self._get_remote_queue()
    67
    68
    69 class AbortableRemoteOperationMixin(object):
    70 remote_step = property(lambda self: self.remote_timeout / 10)
    71
    72 def _operation(self, task, **kwargs):
    73 args = self._get_remote_args(**kwargs),
    74 remote = self.task.apply_async(
    75 args=args, queue=self._get_remote_queue())
    76 for i in xrange(int(self.remote_timeout / self.remote_step)):
    • Dudás Ádám @siliconbrain commented Oct 02, 2014
      Owner

      xrange(start, stop[, step])

      Edited Oct 02, 2014
      ~~xrange(start, stop[, step])~~
    Please register or sign in to reply
  • Dudás Ádám @siliconbrain commented Oct 02, 2014
    Owner

    +1

    +1
  • Őry Máté @orymate

    Added 1 new commit:

    • 5254e2ad - vm: rewrite abort-checking loop
    Oct 02, 2014

    Added 1 new commit:

    • 5254e2ad - vm: rewrite abort-checking loop
    Added 1 new commit: * 5254e2ad739 - vm: rewrite abort-checking loop
    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
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
4
4 participants
Reference: circle/cloud!220