[ARVADOS] updated: 856c4e2694f7b38d0f8182a1353fd6dd3658330e

git at public.curoverse.com git at public.curoverse.com
Mon Nov 23 09:25:09 EST 2015


Summary of changes:
 .../nodemanager/arvnodeman/computenode/driver/azure.py    | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

       via  856c4e2694f7b38d0f8182a1353fd6dd3658330e (commit)
      from  efacbb4c548a4d8c9bda4a8b99a1f2f13e15cd2f (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 856c4e2694f7b38d0f8182a1353fd6dd3658330e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Nov 23 09:25:04 2015 -0500

    Fix Azure node listing in node manager.  refs #5353

diff --git a/services/nodemanager/arvnodeman/computenode/driver/azure.py b/services/nodemanager/arvnodeman/computenode/driver/azure.py
index cfa529b..f517e9c 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/azure.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/azure.py
@@ -78,9 +78,14 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
     def list_nodes(self):
         # Azure only supports filtering node lists by resource group.
         # Do our own filtering based on tag.
-        return [node for node in
+        nodes = [node for node in
                 super(ComputeNodeDriver, self).list_nodes()
                 if node.extra["tags"].get("arvados-class") == self.tags["arvados-class"]]
+        for n in nodes:
+            # Need to populate Node.size
+            if not n.size:
+                n.size = self.sizes[n.extra["properties"]["hardwareProfile"]["vmSize"]]
+        return nodes
 
     def broken(self, cloud_node):
         """Return true if libcloud has indicated the node is in a "broken" state."""
@@ -88,14 +93,6 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
         # of failure that the Azure libcloud driver doesn't know how to interpret.
         return (cloud_node.state in (cloud_types.NodeState.ERROR, cloud_types.NodeState.UNKNOWN))
 
-    def list_nodes(self):
-        # Need to populate Node.size
-        nodes = super(ComputeNodeDriver, self).list_nodes()
-        for n in nodes:
-            if not n.size:
-                n.size = self.sizes[n.extra["properties"]["hardwareProfile"]["vmSize"]]
-        return nodes
-
     @classmethod
     def node_fqdn(cls, node):
         return node.extra["tags"].get("hostname")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list