[ARVADOS] created: 1.1.4-415-g115a5e886

Git user git at public.curoverse.com
Tue Jun 12 21:37:55 EDT 2018


        at  115a5e8861ef0a46224b2cd64568b30c884908fb (commit)


commit 115a5e8861ef0a46224b2cd64568b30c884908fb
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Tue Jun 12 22:35:21 2018 -0300

    7478: Fixes InvalidCloudSize creation. Adds wishlist related node info to logs.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/nodemanager/arvnodeman/computenode/driver/ec2.py b/services/nodemanager/arvnodeman/computenode/driver/ec2.py
index c6c119b28..c453b91cc 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('metadata', {}).get('arvados_node_size')
+            n.extra['arvados_node_size'] = n.extra.get('tags', {}).get('arvados_node_size')
         return nodes
 
     @classmethod
diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py
index 1b9f1e70c..e06c1097b 100644
--- a/services/nodemanager/arvnodeman/daemon.py
+++ b/services/nodemanager/arvnodeman/daemon.py
@@ -318,7 +318,10 @@ class NodeManagerDaemonActor(actor_class):
         busy_count = counts["busy"]
         wishlist_count = self._size_wishlist(size)
 
-        self._logger.info("%s: wishlist %i, up %i (booting %i, unpaired %i, idle %i, busy %i), down %i, shutdown %i", size.name,
+        size_name = size.name
+        if size.preemptable:
+            size_name += ' (preemptable)'
+        self._logger.info("%s: wishlist %i, up %i (booting %i, unpaired %i, idle %i, busy %i), down %i, shutdown %i", size_name,
                           wishlist_count,
                           up_count,
                           counts["booting"],
diff --git a/services/nodemanager/arvnodeman/jobqueue.py b/services/nodemanager/arvnodeman/jobqueue.py
index db578e01f..6c7a93466 100644
--- a/services/nodemanager/arvnodeman/jobqueue.py
+++ b/services/nodemanager/arvnodeman/jobqueue.py
@@ -139,7 +139,7 @@ class ServerCalculator(object):
         for s in self.cloud_sizes:
             if s.id == sizeid:
                 return s
-        return InvalidCloudSize()
+        return self.InvalidCloudSize()
 
 
 class JobQueueMonitorActor(clientactor.RemotePollLoopActor):
@@ -248,5 +248,5 @@ class JobQueueMonitorActor(clientactor.RemotePollLoopActor):
                                    job_uuid,
                                    error)
         self._logger.debug("Calculated wishlist: %s",
-                           ', '.join(s.name for s in server_list) or "(empty)")
+                           ', '.join("%s (preemptable: %s)" % (s.name, s.preemptable) for s in server_list) or "(empty)")
         return super(JobQueueMonitorActor, self)._got_response(server_list)
diff --git a/services/nodemanager/arvnodeman/test/fake_driver.py b/services/nodemanager/arvnodeman/test/fake_driver.py
index fd3330e5e..2a592f9ee 100644
--- a/services/nodemanager/arvnodeman/test/fake_driver.py
+++ b/services/nodemanager/arvnodeman/test/fake_driver.py
@@ -166,7 +166,7 @@ class FakeAwsDriver(FakeDriver):
                                                       ex_userdata=ex_userdata)
         n.extra = {
             "launch_time": time.strftime(ARVADOS_TIMEFMT, time.gmtime())[:-1],
-            "metadata" : {
+            "tags" : {
                 "arvados_node_size": size.id
             }
         }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list