[ARVADOS] updated: 8b3478bda6764b3f30aef69ec0a93729495296c0

git at public.curoverse.com git at public.curoverse.com
Fri Nov 20 16:21:03 EST 2015


Summary of changes:
 services/nodemanager/arvnodeman/computenode/dispatch/__init__.py | 2 ++
 services/nodemanager/arvnodeman/daemon.py                        | 2 ++
 2 files changed, 4 insertions(+)

       via  8b3478bda6764b3f30aef69ec0a93729495296c0 (commit)
       via  c8be92df805483d492acfc1ce9516daf8f1fb39e (commit)
      from  055ac1cc91121d3f27405d4f45455a8de5a0e57e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 8b3478bda6764b3f30aef69ec0a93729495296c0
Merge: 055ac1c c8be92d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Nov 20 21:20:46 2015 +0000

    Merge branch '5353-booted-size' refs #5353

diff --cc services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index 1016fda,b57587b..b366e79
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@@ -134,31 -133,9 +134,33 @@@ class ComputeNodeSetupActor(ComputeNode
                            self.cloud_size.name)
          self.cloud_node = self._cloud.create_node(self.cloud_size,
                                                    self.arvados_node)
+         if not self.cloud_node.size:
+              self.cloud_node.size = self.cloud_size
          self._logger.info("Cloud node %s created.", self.cloud_node.id)
 +        self._later.update_arvados_node_properties()
 +
 +    @ComputeNodeStateChangeBase._retry(config.ARVADOS_ERRORS)
 +    def update_arvados_node_properties(self):
 +        """Tell Arvados some details about the cloud node.
 +
 +        Currently we only include size/price from our request, which
 +        we already knew before create_cloud_node(), but doing it here
 +        gives us an opportunity to provide more detail from
 +        self.cloud_node, too.
 +        """
 +        self.arvados_node['properties']['cloud_node'] = {
 +            # Note this 'size' is the node size we asked the cloud
 +            # driver to create -- not necessarily equal to the size
 +            # reported by the cloud driver for the node that was
 +            # created.
 +            'size': self.cloud_size.id,
 +            'price': self.cloud_size.price,
 +        }
 +        self.arvados_node = self._arvados.nodes().update(
 +            uuid=self.arvados_node['uuid'],
 +            body={'properties': self.arvados_node['properties']},
 +        ).execute()
 +        self._logger.info("%s updated properties.", self.arvados_node['uuid'])
          self._later.post_create()
  
      @ComputeNodeStateChangeBase._retry()

commit c8be92df805483d492acfc1ce9516daf8f1fb39e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Nov 20 21:20:10 2015 +0000

    5352: Set node size on records returned from libcloud create_node

diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index 3c70877..b57587b 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -133,6 +133,8 @@ class ComputeNodeSetupActor(ComputeNodeStateChangeBase):
                           self.cloud_size.name)
         self.cloud_node = self._cloud.create_node(self.cloud_size,
                                                   self.arvados_node)
+        if not self.cloud_node.size:
+             self.cloud_node.size = self.cloud_size
         self._logger.info("Cloud node %s created.", self.cloud_node.id)
         self._later.post_create()
 
diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py
index dbc3273..243d3bf 100644
--- a/services/nodemanager/arvnodeman/daemon.py
+++ b/services/nodemanager/arvnodeman/daemon.py
@@ -276,6 +276,8 @@ class NodeManagerDaemonActor(actor_class):
                                            self._nodes_busy(size) +
                                            self._nodes_missing(size))
 
+        self._logger.debug("%s: idle nodes %i, wishlist size %i", size.name, up_count, self._size_wishlist(size))
+
         wanted = self._size_wishlist(size) - up_count
         if wanted > 0 and self.max_total_price and ((total_price + (size.price*wanted)) > self.max_total_price):
             can_boot = int((self.max_total_price - total_price) / size.price)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list