[ARVADOS] updated: 8b3fd644187c626bda2957f785ee8017d985bf10

Git user git at public.curoverse.com
Mon Feb 29 09:40:12 EST 2016


Summary of changes:
 .../nodemanager/arvnodeman/computenode/driver/__init__.py | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

       via  8b3fd644187c626bda2957f785ee8017d985bf10 (commit)
      from  8b5a707a7a84e7fe9391d9c066f6e08f326e22f7 (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 8b3fd644187c626bda2957f785ee8017d985bf10
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Feb 29 09:40:10 2016 -0500

    8416: Don't catch exception from search_for, potentially hides exceptions we
    wanted to see and the original intended behavior of re-raising the original
    exception doesn't work anyway, because sys.exc_info is overwritten when the 2nd
    exception is caught.

diff --git a/services/nodemanager/arvnodeman/computenode/driver/__init__.py b/services/nodemanager/arvnodeman/computenode/driver/__init__.py
index b6bc8b9..9bdcc5f 100644
--- a/services/nodemanager/arvnodeman/computenode/driver/__init__.py
+++ b/services/nodemanager/arvnodeman/computenode/driver/__init__.py
@@ -148,15 +148,12 @@ class BaseComputeNodeDriver(RetryMixin):
             # loop forever because subsequent create_node attempts will fail
             # due to node name collision.  So check if the node we intended to
             # create shows up in the cloud node list and return it if found.
-            try:
-                node = self.search_for(kwargs['name'], 'list_nodes', self._name_key)
-                if node:
-                    return node
-            except:
-                # Ignore possible exception from find_node in favor of
-                # re-raising the original create_node exception.
-                pass
-            raise
+            node = self.search_for(kwargs['name'], 'list_nodes', self._name_key)
+            if node:
+                return node
+            else:
+                # something else went wrong, re-raise the exception
+                raise
 
     def post_create_node(self, cloud_node):
         # ComputeNodeSetupActor calls this method after the cloud node is

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list