[ARVADOS] created: 1.1.0-30-g6964348
Git user
git at public.curoverse.com
Mon Oct 16 15:52:33 EDT 2017
at 696434828d9beeb33852de15b3866be040c5b0fa (commit)
commit 696434828d9beeb33852de15b3866be040c5b0fa
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Oct 16 15:50:36 2017 -0400
12452: Consider unpaired node older than boot grace period 'down'.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index c5dd1ad..6c61e32 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -364,9 +364,15 @@ class ComputeNodeMonitorActor(config.actor_class):
def get_state(self):
"""Get node state, one of ['unpaired', 'busy', 'idle', 'down']."""
- # If this node is not associated with an Arvados node, return 'unpaired'.
+ # If this node is not associated with an Arvados node, return
+ # 'unpaired' if we're in the boot grace period, and 'down' if not,
+ # so it isn't counted towards usable nodes.
if self.arvados_node is None:
- return 'unpaired'
+ if timestamp_fresh(self.cloud_node_start_time,
+ self.boot_fail_after):
+ return 'unpaired'
+ else:
+ return 'down'
state = self.arvados_node['crunch_worker_state']
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list