[ARVADOS] updated: 0de80c89b739db05f4de2ec214daf2e34fce54c4

Git user git at public.curoverse.com
Fri Jun 24 11:39:17 EDT 2016


Summary of changes:
 services/nodemanager/arvnodeman/computenode/dispatch/__init__.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

       via  0de80c89b739db05f4de2ec214daf2e34fce54c4 (commit)
      from  30175eff28e6add8053dacc7a6a8091c59844835 (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 0de80c89b739db05f4de2ec214daf2e34fce54c4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Jun 24 11:39:12 2016 -0400

    9486: Set success flag on self instead of using default parameter on _finished()

diff --git a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
index f4bdb43..0882952 100644
--- a/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
@@ -153,9 +153,8 @@ class ComputeNodeSetupActor(ComputeNodeStateChangeBase):
         self._later.post_create()
 
     @RetryMixin._retry(config.ARVADOS_ERRORS)
-    def _finished(self, success_flag=False):
-        self.success = success_flag
-        if success_flag is not True and self.arvados_node:
+    def _finished(self):
+        if self.success is not True and self.arvados_node:
             # Delete arvados node record on setup failure, this is safe to do
             # because this actor has already claimed the node record.  This
             # addresses the failure mode where node manager is unable to create
@@ -165,13 +164,15 @@ class ComputeNodeSetupActor(ComputeNodeStateChangeBase):
             # which can result in the node table filling up with unused
             # records.
             self._arvados.nodes().delete(uuid=self.arvados_node['uuid']).execute()
+            self.success = False
         return super(ComputeNodeSetupActor, self)._finished()
 
     @RetryMixin._retry()
     def post_create(self):
         self._cloud.post_create_node(self.cloud_node)
         self._logger.info("%s post-create work done.", self.cloud_node.id)
-        self._finished(True)
+        self.success = True
+        self._finished()
 
     def stop_if_no_cloud_node(self):
         if self.cloud_node is not None:

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list