libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r1061130 - /incubator/libcloud/trunk/libcloud/base.py
Date Thu, 20 Jan 2011 06:28:35 GMT
Author: pquerna
Date: Thu Jan 20 06:28:35 2011
New Revision: 1061130

URL: http://svn.apache.org/viewvc?rev=1061130&view=rev
Log:
Try to be more robust about transient connectivity issues over the SSH connection during deployment

Modified:
    incubator/libcloud/trunk/libcloud/base.py

Modified: incubator/libcloud/trunk/libcloud/base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/base.py?rev=1061130&r1=1061129&r2=1061130&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/base.py (original)
+++ incubator/libcloud/trunk/libcloud/base.py Thu Jan 20 06:28:35 2011
@@ -864,8 +864,18 @@ class NodeDriver(object):
           if laste is not None:
               raise e
 
-          n = kwargs["deploy"].run(node, client)
-          client.close()
+          tries = 3
+          while tries >= 0:
+            try:
+              n = kwargs["deploy"].run(node, client)
+              client.close()
+              break
+            except Exception, e:
+              tries -= 1
+              if tries == 0:
+                raise
+              client.connect()
+
         except DeploymentError, e:
           raise
         except Exception, e:



Mime
View raw message