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 !31 opened Mar 14, 2014 by Guba Sándor@gubasandor 
  • Report abuse
Report abuse

Fix node scalability #102

  • Discussion 10
  • Commits 6
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Bach Dániel
    @bachdaniel started a discussion on an old version of the diff Mar 14, 2014
    Last updated by Guba Sándor Mar 17, 2014
    circle/storage/models.py
    352 357 :type instance: vm.models.Instance or InstanceTemplate or NoneType
    353 358 :param user: owner of the disk
    354 359 :type user: django.contrib.auth.User
    355 :param task_uuid: TODO
    356 :param abortable_task: TODO
    360 :param task_uuid: UUID of the local task
    361 :param abortable_task: UUID of the remote running abortable task.
    357 362  
    358 363 :return: The created Disk object
    359 364 :rtype: Disk
    360 365 """
    361 366 kwargs.setdefault('name', url.split('/')[-1])
    362 disk = Disk.create(type="iso", size=1, **kwargs)
    367 disk = Disk.create(type="iso", instance=instance, user=user,
    368 size=1, **kwargs)
    • Bach Dániel @bachdaniel commented Mar 14, 2014
      Owner

      miért jó a size=1?

      miért jó a size=1?
    • Guba Sándor @gubasandor commented Mar 15, 2014
      Owner

      Size can't be NULL in DB

      Size can't be NULL in DB
    • Őry Máté @orymate commented Mar 15, 2014
      Owner

      You can change it. Anyway, 1 seems to be much more magic than zero.

      You can change it. Anyway, 1 seems to be much more magic than zero.
    • Guba Sándor @gubasandor commented Mar 17, 2014
      Owner

      fixed in commit 043c0a42

      fixed in commit 043c0a42f
    Please register or sign in to reply
  • Bach Dániel
    @bachdaniel started a discussion on an old version of the diff Mar 14, 2014
    Last updated by Őry Máté Mar 15, 2014
    circle/vm/models/node.py
    25 25 logger = getLogger(__name__)
    26 26  
    27 27  
    28 def node_available(function):
    29 """Decorate methods to ignore disabled Nodes.
    30 """
    31 def decorate(self, *args, **kwargs):
    32 if self.enabled is True and self.online is True:
    • Bach Dániel @bachdaniel commented Mar 14, 2014
      Owner

      if self.enabled and self.online

      `if self.enabled and self.online`
    • Őry Máté @orymate commented Mar 15, 2014
      Owner

      This actually caused false None values. ca27897d8 fixed it

      Edited Mar 15, 2014
      This actually caused false None values. ca27897d8 fixed it
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on the diff Mar 14, 2014
    Last updated by Őry Máté Mar 15, 2014
    circle/vm/models/node.py
    55 66 def __unicode__(self):
    56 67 return self.name
    57 68  
    58 @method_cache(10, 5)
    69 @method_cache(10)
    59 70 def get_online(self):
    60 71 """Check if the node is online.
    61 72  
    62 Runs a remote ping task if the worker is running.
    73 Check if node is online by queue is available.
    63 74 """
    64 75 try:
    65 return self.remote_query(vm_tasks.ping, timeout=1, default=False)
    • Őry Máté @orymate commented Mar 14, 2014
      Owner

      ez is dobott már kivételt, ha nincs meg a queue

      ez is dobott már kivételt, ha nincs meg a queue
    • Őry Máté @orymate commented Mar 15, 2014
      Owner

      OK with bdeba0d6d

      OK with bdeba0d6d
    Please register or sign in to reply
  • Őry Máté
    @orymate started a discussion on the diff Mar 14, 2014
    circle/vm/models/node.py
    55 66 def __unicode__(self):
    56 67 return self.name
    57 68  
    58 @method_cache(10, 5)
    69 @method_cache(10)
    59 70 def get_online(self):
    60 71 """Check if the node is online.
    61 72  
    62 Runs a remote ping task if the worker is running.
    73 Check if node is online by queue is available.
    63 74 """
    64 75 try:
    65 return self.remote_query(vm_tasks.ping, timeout=1, default=False)
    66 except WorkerNotFound:
    76 self.get_remote_queue_name("vm")
    • Őry Máté @orymate commented Mar 14, 2014
      Owner

      check_queue contains a 1sec timeout. so the negative case is not sped up. the timeout can be lowered to 0.1sec, but even 25*0.1 is 2.5secs of wait.

      fixed in bdeba0d6d

      Edited Mar 15, 2014
      check_queue contains a 1sec timeout. so the negative case is not sped up. the timeout can be lowered to 0.1sec, but even 25*0.1 is 2.5secs of wait. fixed in bdeba0d6d
    Please register or sign in to reply
  • Őry Máté @orymate commented Mar 15, 2014
    Owner

    👍

    :+1:
  • 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
Guba Sándor
Assignee
Guba Sándor @gubasandor
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
3
3 participants
Reference: circle/cloud!31