[ARVADOS] updated: f6aa7c0c8c84b85b550d73117c6fdbd663a38c4c

git at public.curoverse.com git at public.curoverse.com
Wed Sep 30 10:33:36 EDT 2015


Summary of changes:
 .../arvnodeman/computenode/dispatch/__init__.py    |  3 ---
 services/nodemanager/tests/test_daemon.py          | 23 +++++++++++++++++++++-
 2 files changed, 22 insertions(+), 4 deletions(-)

       via  f6aa7c0c8c84b85b550d73117c6fdbd663a38c4c (commit)
      from  560c318fdc49835b03f96af35774fbbfa7984fe7 (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 f6aa7c0c8c84b85b550d73117c6fdbd663a38c4c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Sep 30 10:35:04 2015 -0400

    7286: Add test that "missing" nodes are not counted towards "busy" (but are
    counted towards node max).

diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index 70e6e8e..4557198 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -323,9 +323,6 @@ class ComputeNodeMonitorActor(config.actor_class):
         return result
 
     def shutdown_eligible(self):
-        import logging
-        logging.warn("XXX %s %s", self.arvados_node, self._cloud.broken(self.cloud_node))
-
         if not self._shutdowns.window_open():
             return False
         elif self.arvados_node is None:
diff --git a/services/nodemanager/tests/test_daemon.py b/services/nodemanager/tests/test_daemon.py
index b406f13..8c622ec 100644
--- a/services/nodemanager/tests/test_daemon.py
+++ b/services/nodemanager/tests/test_daemon.py
@@ -123,7 +123,28 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
         self.make_daemon([testutil.cloud_node_mock()],
                          want_sizes=[testutil.MockSize(1)])
         self.stop_proxy(self.daemon)
-        self.assertFalse(self.node_setup.called)
+        self.assertFalse(self.node_setup.start.called)
+
+    def test_dont_count_missing_as_busy(self):
+        size = testutil.MockSize(1)
+        self.make_daemon(cloud_nodes=[testutil.cloud_node_mock(1),
+                                      testutil.cloud_node_mock(2)],
+                         arvados_nodes=[testutil.arvados_node_mock(1),
+                                      testutil.arvados_node_mock(2, status="missing")],
+                         want_sizes=[size, size])
+        self.stop_proxy(self.daemon)
+        self.assertTrue(self.node_setup.start.called)
+
+    def test_missing_counts_towards_max(self):
+        size = testutil.MockSize(1)
+        self.make_daemon(cloud_nodes=[testutil.cloud_node_mock(1),
+                                      testutil.cloud_node_mock(2)],
+                         arvados_nodes=[testutil.arvados_node_mock(1),
+                                        testutil.arvados_node_mock(2, status="missing")],
+                         want_sizes=[size, size],
+                         max_nodes=2)
+        self.stop_proxy(self.daemon)
+        self.assertFalse(self.node_setup.start.called)
 
     def test_booting_nodes_counted(self):
         cloud_node = testutil.cloud_node_mock(1)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list