[ARVADOS] updated: be81c03a3c26f365eba35b91e4f0827244a02ef7
git at public.curoverse.com
git at public.curoverse.com
Wed Sep 30 16:24:56 EDT 2015
Summary of changes:
.../nodemanager/arvnodeman/computenode/dispatch/__init__.py | 1 -
services/nodemanager/arvnodeman/daemon.py | 2 +-
services/nodemanager/tests/test_daemon.py | 12 ++++++++++++
3 files changed, 13 insertions(+), 2 deletions(-)
via be81c03a3c26f365eba35b91e4f0827244a02ef7 (commit)
from c0f33379c7fd062fc097ecef92808334e821cb6b (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 be81c03a3c26f365eba35b91e4f0827244a02ef7
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Sep 30 16:26:46 2015 -0400
7286: Missing nodes are considered in "excess" count (reverts previous change). Added test. Also remove debug log statement.
diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index 4ebd437..9ea6c32 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -332,7 +332,6 @@ class ComputeNodeMonitorActor(config.actor_class):
elif arvados_node_missing(self.arvados_node, self.node_stale_after) and self._cloud.broken(self.cloud_node):
# Node is paired, but Arvados says it is missing and the cloud says the node
# is in an error state, so shut it down.
- self._logger.warn("blah %s %s", arvados_node_missing(self.arvados_node, self.node_stale_after), self._cloud.broken(self.cloud_node))
return True
else:
return self.in_state('idle')
diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py
index 30592ab..6f33a3b 100644
--- a/services/nodemanager/arvnodeman/daemon.py
+++ b/services/nodemanager/arvnodeman/daemon.py
@@ -228,7 +228,7 @@ class NodeManagerDaemonActor(actor_class):
return len(self.last_wishlist) - up_count
def _nodes_excess(self):
- up_count = self._nodes_up() - len(self.shutdowns) - self._nodes_missing()
+ up_count = self._nodes_up() - len(self.shutdowns)
over_min = up_count - self.min_nodes
if over_min <= 0:
return over_min
diff --git a/services/nodemanager/tests/test_daemon.py b/services/nodemanager/tests/test_daemon.py
index 02dec42..57ea46c 100644
--- a/services/nodemanager/tests/test_daemon.py
+++ b/services/nodemanager/tests/test_daemon.py
@@ -146,6 +146,18 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
self.stop_proxy(self.daemon)
self.assertFalse(self.node_setup.start.called)
+ def test_excess_counts_missing(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, last_ping_at='1970-01-01T01:02:03.04050607Z')],
+ want_sizes=[size])
+ self.assertEqual(2, self.alive_monitor_count())
+ for mon_ref in self.monitor_list():
+ self.daemon.node_can_shutdown(mon_ref.proxy()).get(self.TIMEOUT)
+ self.assertEqual(1, self.node_shutdown.start.call_count)
+
def test_booting_nodes_counted(self):
cloud_node = testutil.cloud_node_mock(1)
arv_node = testutil.arvados_node_mock(1)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list