[ARVADOS] updated: a8b3df3d2c5fa8fa66484d6bb0d20a37a0863d90
git at public.curoverse.com
git at public.curoverse.com
Wed Oct 22 15:11:13 EDT 2014
Summary of changes:
services/nodemanager/arvnodeman/daemon.py | 4 ++--
services/nodemanager/tests/test_daemon.py | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
via a8b3df3d2c5fa8fa66484d6bb0d20a37a0863d90 (commit)
from 6eaaae29a7af005e417673d79e0951122065e685 (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 a8b3df3d2c5fa8fa66484d6bb0d20a37a0863d90
Author: Brett Smith <brett at curoverse.com>
Date: Wed Oct 22 15:13:09 2014 -0400
4137: Fix bad state reference in Node Manager daemon.
Refs #4137.
diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py
index 803e9ba..6ea3cdf 100644
--- a/services/nodemanager/arvnodeman/daemon.py
+++ b/services/nodemanager/arvnodeman/daemon.py
@@ -161,8 +161,8 @@ class NodeManagerDaemonActor(actor_class):
self._update_poll_time('cloud_nodes')
for key, node in self.cloud_nodes.update_from(nodelist):
self._logger.info("Registering new cloud node %s", key)
- if key in self.booting:
- record = self.booting.pop(key)
+ if key in self.booted:
+ record = self.booted.pop(key)
else:
record = self._new_node(node)
self.cloud_nodes.add(record)
diff --git a/services/nodemanager/tests/test_daemon.py b/services/nodemanager/tests/test_daemon.py
index eb625be..869ae4a 100644
--- a/services/nodemanager/tests/test_daemon.py
+++ b/services/nodemanager/tests/test_daemon.py
@@ -130,6 +130,13 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
self.daemon.node_up(setup).get(self.TIMEOUT)
self.assertEqual(1, self.node_factory.start.call_count)
+ def test_no_duplication_when_booted_node_listed(self):
+ cloud_node = testutil.cloud_node_mock(2)
+ setup = self.start_node_boot(cloud_node, id_num=2)
+ self.daemon.node_up(setup)
+ self.daemon.update_cloud_nodes([cloud_node]).get(self.TIMEOUT)
+ self.assertEqual(1, self.node_factory.start.call_count)
+
def test_node_counted_after_boot_with_slow_listing(self):
# Test that, after we boot a compute node, we assume it exists
# even it doesn't appear in the listing (e.g., because of delays
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list