From: Peter Amstutz Date: Mon, 16 Oct 2017 19:50:36 +0000 (-0400) Subject: 12452: Consider unpaired node older than boot grace period 'down'. X-Git-Tag: 1.1.0~7^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/696434828d9beeb33852de15b3866be040c5b0fa 12452: Consider unpaired node older than boot grace period 'down'. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- 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']