[ARVADOS] created: 1e74db260a84317d58969b9b530d0d87a325da9c
git at public.curoverse.com
git at public.curoverse.com
Wed Oct 14 10:47:49 EDT 2015
at 1e74db260a84317d58969b9b530d0d87a325da9c (commit)
commit 1e74db260a84317d58969b9b530d0d87a325da9c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Oct 14 10:49:49 2015 -0400
6321: Add OSError to slurm shutdown actor retry conditions, to catch and retry
subprocess errors from the operating system, which is preferrable to crashing
the shutdown actor.
diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py b/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py
index dfb26bc..39ee48f 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py
@@ -34,7 +34,7 @@ class ComputeNodeShutdownActor(ShutdownActorBase):
def _get_slurm_state(self):
return subprocess.check_output(['sinfo', '--noheader', '-o', '%t', '-n', self._nodename])
- @ShutdownActorBase._retry((subprocess.CalledProcessError,))
+ @ShutdownActorBase._retry((subprocess.CalledProcessError, OSError))
def cancel_shutdown(self):
if self._nodename:
if self._get_slurm_state() in self.SLURM_DRAIN_STATES:
@@ -47,14 +47,14 @@ class ComputeNodeShutdownActor(ShutdownActorBase):
return super(ComputeNodeShutdownActor, self).cancel_shutdown()
@ShutdownActorBase._stop_if_window_closed
- @ShutdownActorBase._retry((subprocess.CalledProcessError,))
+ @ShutdownActorBase._retry((subprocess.CalledProcessError, OSError))
def issue_slurm_drain(self):
self._set_node_state('DRAIN', 'Reason=Node Manager shutdown')
self._logger.info("Waiting for SLURM node %s to drain", self._nodename)
self._later.await_slurm_drain()
@ShutdownActorBase._stop_if_window_closed
- @ShutdownActorBase._retry((subprocess.CalledProcessError,))
+ @ShutdownActorBase._retry((subprocess.CalledProcessError, OSError))
def await_slurm_drain(self):
output = self._get_slurm_state()
if output in self.SLURM_END_STATES:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list