[ARVADOS] updated: 425f9a753e4390215b95b794785efd38bbc5f42d
Git user
git at public.curoverse.com
Thu Feb 16 15:12:56 EST 2017
Summary of changes:
services/nodemanager/arvnodeman/computenode/dispatch/__init__.py | 2 ++
services/nodemanager/arvnodeman/computenode/dispatch/slurm.py | 6 ++++++
services/nodemanager/tests/test_computenode_dispatch_slurm.py | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
via 425f9a753e4390215b95b794785efd38bbc5f42d (commit)
from 314f3c34442e0daffbea4ed62adea9e722673810 (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 425f9a753e4390215b95b794785efd38bbc5f42d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Feb 16 15:10:34 2017 -0500
6520: Explicitly mark node as 'down' before shutting down.
diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index 7a94dae..fc3ff05 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -229,7 +229,9 @@ class ComputeNodeShutdownActor(ComputeNodeStateChangeBase):
self.cancel_shutdown("No longer eligible for shut down because %s" % reason,
try_resume=True)
return
+ self._destroy_node()
+ def _destroy_node(self):
self._logger.info("Starting shutdown")
arv_node = self._arvados_node()
if self._cloud.destroy_node(self.cloud_node):
diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py b/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py
index cc344e5..be24e0f 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/slurm.py
@@ -77,6 +77,12 @@ class ComputeNodeShutdownActor(SlurmMixin, ShutdownActorBase):
# any other state.
self._later.shutdown_node()
+ def _destroy_node(self):
+ if self._nodename:
+ self._set_node_state(self._nodename, 'DOWN')
+ super(ComputeNodeShutdownActor, self)._destroy_node()
+
+
class ComputeNodeUpdateActor(UpdateActorBase):
def sync_node(self, cloud_node, arvados_node):
if arvados_node.get("hostname"):
diff --git a/services/nodemanager/tests/test_computenode_dispatch_slurm.py b/services/nodemanager/tests/test_computenode_dispatch_slurm.py
index 38fe1d7..e1def28 100644
--- a/services/nodemanager/tests/test_computenode_dispatch_slurm.py
+++ b/services/nodemanager/tests/test_computenode_dispatch_slurm.py
@@ -33,7 +33,7 @@ class SLURMComputeNodeShutdownActorTestCase(ComputeNodeShutdownActorMixin,
proc_mock.return_value = end_state
proc_mock.side_effect = None
self.check_success_flag(True, 3)
- self.check_slurm_got_args(proc_mock, 'compute63')
+ self.check_slurm_got_args(proc_mock, 'NodeName=compute63')
def make_wait_state_test(start_state='drng\n', end_state='drain\n'):
def test(self, proc_mock):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list