[ARVADOS] created: 1.1.4-630-g8ab6b4823

Git user git at public.curoverse.com
Thu Jul 19 11:12:40 EDT 2018


        at  8ab6b482342b95ad35775867bcdb8fd691b78fb7 (commit)


commit 8ab6b482342b95ad35775867bcdb8fd691b78fb7
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Jul 19 11:12:05 2018 -0400

    13868: Fallback behavior when arvados_node_size tag is missing
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/nodemanager/arvnodeman/computenode/driver/azure.py b/services/nodemanager/arvnodeman/computenode/driver/azure.py
index 719124d40..35c8b5a8c 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/azure.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/azure.py
@@ -90,7 +90,7 @@ echo %s > /var/tmp/arv-node-data/meta-data/instance-type
             # Need to populate Node.size
             if not n.size:
                 n.size = self.sizes()[n.extra["properties"]["hardwareProfile"]["vmSize"]]
-            n.extra['arvados_node_size'] = n.extra.get('tags', {}).get('arvados_node_size')
+            n.extra['arvados_node_size'] = n.extra.get('tags', {}).get('arvados_node_size') or n.size.id
         return nodes
 
     def broken(self, cloud_node):
diff --git a/services/nodemanager/arvnodeman/computenode/driver/ec2.py b/services/nodemanager/arvnodeman/computenode/driver/ec2.py
index 56812d258..418a9f9d8 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/ec2.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/ec2.py
@@ -111,7 +111,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
         for n in nodes:
             if not n.size:
                 n.size = self.sizes()[n.extra["instance_type"]]
-            n.extra['arvados_node_size'] = n.extra.get('tags', {}).get('arvados_node_size')
+            n.extra['arvados_node_size'] = n.extra.get('tags', {}).get('arvados_node_size') or n.size.id
         return nodes
 
     @classmethod
diff --git a/services/nodemanager/arvnodeman/computenode/driver/gce.py b/services/nodemanager/arvnodeman/computenode/driver/gce.py
index 11025f784..23a101731 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/gce.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/gce.py
@@ -121,7 +121,7 @@ class ComputeNodeDriver(BaseComputeNodeDriver):
             if not hasattr(node.size, 'id'):
                 node.size = self.sizes()[node.size]
             # Get arvados-assigned cloud size id
-            node.extra['arvados_node_size'] = node.extra.get('metadata', {}).get('arvados_node_size')
+            node.extra['arvados_node_size'] = node.extra.get('metadata', {}).get('arvados_node_size') or node.size.id
         return nodelist
 
     @classmethod
diff --git a/services/nodemanager/arvnodeman/jobqueue.py b/services/nodemanager/arvnodeman/jobqueue.py
index 1020b4a80..7ca9c9553 100644
--- a/services/nodemanager/arvnodeman/jobqueue.py
+++ b/services/nodemanager/arvnodeman/jobqueue.py
@@ -37,7 +37,10 @@ class ServerCalculator(object):
             self.scratch = 0
             self.cores = 0
             self.bandwidth = 0
-            self.price = 9999999
+            # price is multiplied by 1000 to get the node weight
+            # the maximum node weight is                  4294967280
+            # so use invalid node weight 4294967 * 1000 = 4294967000
+            self.price = 4294967
             self.preemptible = False
             self.extra = {}
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list