[ARVADOS] created: 1.1.4-363-gdf8a51c

Git user git at public.curoverse.com
Wed Jun 6 14:38:02 EDT 2018


        at  df8a51cd6b8a95475dfaef08c8a56b1e1643dbfc (commit)


commit df8a51cd6b8a95475dfaef08c8a56b1e1643dbfc
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Wed Jun 6 15:37:04 2018 -0300

    13480: Ignore nodes with no tags instead of crashing.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/nodemanager/arvnodeman/computenode/driver/azure.py b/services/nodemanager/arvnodeman/computenode/driver/azure.py
index e0f260a..1528172 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/azure.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/azure.py
@@ -83,7 +83,7 @@ echo %s > /var/tmp/arv-node-data/meta-data/instance-type
         # Do our own filtering based on tag.
         nodes = [node for node in
                 super(ComputeNodeDriver, self).list_nodes(ex_fetch_nic=False, ex_fetch_power_state=False)
-                if node.extra["tags"].get("arvados-class") == self.tags["arvados-class"]]
+                if node.extra.get("tags", {}).get("arvados-class") == self.tags["arvados-class"]]
         for n in nodes:
             # Need to populate Node.size
             if not n.size:

commit 1b183730bd6ec56d51b17020e63fb2cffa2ad764
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Wed Jun 6 15:36:07 2018 -0300

    13480: Adds test making the bug show itself.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/nodemanager/tests/test_computenode_driver_azure.py b/services/nodemanager/tests/test_computenode_driver_azure.py
index ce96a80..87cbc2e 100644
--- a/services/nodemanager/tests/test_computenode_driver_azure.py
+++ b/services/nodemanager/tests/test_computenode_driver_azure.py
@@ -91,6 +91,14 @@ echo z1.test > /var/tmp/arv-node-data/meta-data/instance-type
 """,
                          driver.arvados_create_kwargs(testutil.MockSize(1), arv_node)['ex_customdata'])
 
+    def test_list_nodes_ignores_nodes_without_tags(self):
+        driver = self.new_driver(create_kwargs={"tag_arvados-class": "dynamic-compute"})
+        # Mock cloud node without tags
+        nodelist = [testutil.cloud_node_mock(1)]
+        self.driver_mock().list_nodes.return_value = nodelist
+        n = driver.list_nodes()
+        self.assertEqual([], n)
+
     def test_create_raises_but_actually_succeeded(self):
         arv_node = testutil.arvados_node_mock(1, hostname=None)
         driver = self.new_driver(create_kwargs={"tag_arvados-class": "dynamic-compute"})

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list