[ARVADOS] updated: 1.1.4-403-gb70f9ce

Git user git at public.curoverse.com
Mon Jun 11 18:50:10 EDT 2018


Summary of changes:
 .../arvnodeman/computenode/driver/gce.py           | 28 ++++++++++------------
 1 file changed, 12 insertions(+), 16 deletions(-)

       via  b70f9ce54f1f672b423999e6c07b2f0127b76666 (commit)
      from  17f521d7ffb4f3a58ca98a27395eb60d9fa34519 (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 b70f9ce54f1f672b423999e6c07b2f0127b76666
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Mon Jun 11 19:49:21 2018 -0300

    7478: Fixes GCE driver's arvados_node_size tag handling.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/nodemanager/arvnodeman/computenode/driver/gce.py b/services/nodemanager/arvnodeman/computenode/driver/gce.py
index f8d81ca..be39ecb 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/gce.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/gce.py
@@ -102,31 +102,27 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
                   'ex_disks_gce_struct': disks,
                   }
         result['ex_metadata'].update({
-                'arv-ping-url': self._make_ping_url(arvados_node),
-                'booted_at': time.strftime(ARVADOS_TIMEFMT, time.gmtime()),
-                'hostname': arvados_node_fqdn(arvados_node),
-                })
+            'arvados_node_size': size.id,
+            'arv-ping-url': self._make_ping_url(arvados_node),
+            'booted_at': time.strftime(ARVADOS_TIMEFMT, time.gmtime()),
+            'hostname': arvados_node_fqdn(arvados_node),
+        })
         return result
 
-
-    def create_node(self, size, arvados_node):
-        # Set up tag indicating the Arvados assigned Cloud Size id.
-        self.create_kwargs['ex_metadata'].update({'arvados_node_size': size.id})
-        return super(ComputeNodeDriver, self).create_node(size, arvados_node)
-
     def list_nodes(self):
         # The GCE libcloud driver only supports filtering node lists by zone.
         # Do our own filtering based on tag list.
         nodelist = [node for node in
                     super(ComputeNodeDriver, self).list_nodes()
                     if self.node_tags.issubset(node.extra.get('tags', []))]
-        # As of 0.18, the libcloud GCE driver sets node.size to the size's name.
-        # It's supposed to be the actual size object.  Check that it's not,
-        # and monkeypatch the results when that's the case.
-        if nodelist and not hasattr(nodelist[0].size, 'id'):
-            for node in nodelist:
+        for node in nodelist:
+            # As of 0.18, the libcloud GCE driver sets node.size to the size's name.
+            # It's supposed to be the actual size object.  Check that it's not,
+            # and monkeypatch the results when that's the case.
+            if not hasattr(node.size, 'id'):
                 node.size = self._sizes_by_id[node.size]
-                node.extra['arvados_node_size'] = node.extra.get('metadata', {}).get('arvados_node_size')
+            # Get arvados-assigned cloud size id
+            node.extra['arvados_node_size'] = node.extra.get('metadata', {}).get('arvados_node_size')
         return nodelist
 
     @classmethod

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list