[ARVADOS] updated: 3dc4c3e304a1d2ccb975a43679276eed55bd49fd
Git user
git at public.curoverse.com
Fri Apr 15 10:37:38 EDT 2016
Summary of changes:
.../arvnodeman/computenode/dispatch/__init__.py | 60 +++++++++++-----------
1 file changed, 30 insertions(+), 30 deletions(-)
via 3dc4c3e304a1d2ccb975a43679276eed55bd49fd (commit)
from 51f64605f9b033efcc02b45376f2b7f22e360483 (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 3dc4c3e304a1d2ccb975a43679276eed55bd49fd
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Apr 15 10:37:34 2016 -0400
8953: Fix indentation of shutdown_eligible().
diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index 9bb7bd0..dbecfd3 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -356,40 +356,40 @@ class ComputeNodeMonitorActor(config.actor_class):
return result
def shutdown_eligible(self):
- # Collect states and then consult state transition table
- # whether we should shut down. Possible states are:
- #
- # crunch_worker_state = ['unpaired', 'busy', 'idle', 'down']
- # window = ["open", "closed"]
- # boot_grace = ["boot wait", "boot exceeded"]
- # idle_grace = ["not idle", "idle wait", "idle exceeded"]
-
- if self.arvados_node is None:
- crunch_worker_state = 'unpaired'
- elif not timestamp_fresh(arvados_node_mtime(self.arvados_node), self.node_stale_after):
- return "node state is stale"
- elif self.arvados_node['crunch_worker_state']:
- crunch_worker_state = self.arvados_node['crunch_worker_state']
- else:
- return "node is paired but crunch_worker_state is '%s'" % self.arvados_node['crunch_worker_state']
+ # Collect states and then consult state transition table
+ # whether we should shut down. Possible states are:
+ #
+ # crunch_worker_state = ['unpaired', 'busy', 'idle', 'down']
+ # window = ["open", "closed"]
+ # boot_grace = ["boot wait", "boot exceeded"]
+ # idle_grace = ["not idle", "idle wait", "idle exceeded"]
+
+ if self.arvados_node is None:
+ crunch_worker_state = 'unpaired'
+ elif not timestamp_fresh(arvados_node_mtime(self.arvados_node), self.node_stale_after):
+ return "node state is stale"
+ elif self.arvados_node['crunch_worker_state']:
+ crunch_worker_state = self.arvados_node['crunch_worker_state']
+ else:
+ return "node is paired but crunch_worker_state is '%s'" % self.arvados_node['crunch_worker_state']
- window = "open" if self._shutdowns.window_open() else "closed"
+ window = "open" if self._shutdowns.window_open() else "closed"
- if timestamp_fresh(self.cloud_node_start_time, self.boot_fail_after):
- boot_grace = "boot wait"
- else:
- boot_grace = "boot exceeded"
+ if timestamp_fresh(self.cloud_node_start_time, self.boot_fail_after):
+ boot_grace = "boot wait"
+ else:
+ boot_grace = "boot exceeded"
- # API server side not implemented yet.
- idle_grace = 'idle exceeded'
+ # API server side not implemented yet.
+ idle_grace = 'idle exceeded'
- node_state = (crunch_worker_state, window, boot_grace, idle_grace)
- t = transitions[node_state]
- self._debug("Node state is %s, transition is %s", node_state , t)
- if t:
- return True
- else:
- return "node state is %s" % (node_state,)
+ node_state = (crunch_worker_state, window, boot_grace, idle_grace)
+ t = transitions[node_state]
+ self._debug("Node state is %s, transition is %s", node_state , t)
+ if t:
+ return True
+ else:
+ return "node state is %s" % (node_state,)
def consider_shutdown(self):
try:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list