From 696434828d9beeb33852de15b3866be040c5b0fa Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 16 Oct 2017 15:50:36 -0400 Subject: [PATCH] 12452: Consider unpaired node older than boot grace period 'down'. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- .../arvnodeman/computenode/dispatch/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py index c5dd1adef1..6c61e32b8d 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'] -- 2.30.2