You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/02/09 09:18:59 UTC

[incubator-datalab] branch DATALAB-2091 updated (7fb8b17 -> b8285d0)

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a change to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git.


    from 7fb8b17  [DATALAB-2091]: added missing import
     new 0f54889  [DATALAB-2091]: added sys.exit to init_datalab_connection
     new b8285d0  [DATALAB-2091]: reduced amount of connection attempts

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/general/lib/os/fab.py                      | 29 ++++++++++++----------
 1 file changed, 16 insertions(+), 13 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org


[incubator-datalab] 02/02: [DATALAB-2091]: reduced amount of connection attempts

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit b8285d0e41864efc34430b00c30f0b7d85bf44d8
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Feb 9 11:18:43 2021 +0200

    [DATALAB-2091]: reduced amount of connection attempts
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 10abc45..8815acc 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1011,7 +1011,7 @@ def init_datalab_connection(ip, user, pkey):
     try:
         global conn
         attempt = 0
-        while attempt < 100:
+        while attempt < 4:
             logging.info('connection attempt {}'.format(attempt))
             conn = Connection(ip, user, connect_kwargs={'key_filename': pkey})
             try:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org


[incubator-datalab] 01/02: [DATALAB-2091]: added sys.exit to init_datalab_connection

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 0f548894557dc2ec49468a8358055af28d5e482d
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Feb 8 17:42:48 2021 +0200

    [DATALAB-2091]: added sys.exit to init_datalab_connection
---
 .../src/general/lib/os/fab.py                      | 29 ++++++++++++----------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 6bf93b8..10abc45 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1008,16 +1008,19 @@ def close_connection():
     conn.close()
 
 def init_datalab_connection(ip, user, pkey):
-    global conn
-    attempt = 0
-    while attempt < 100:
-        logging.info('connection attempt {}'.format(attempt))
-        conn = Connection(ip, user, connect_kwargs={'key_filename': pkey})
-        try:
-            conn.run('ls')
-            return conn
-        except Exception as ex:
-            logging.error(ex)
-            traceback.print_exc()
-            attempt += 1
-            time.sleep(10)
\ No newline at end of file
+    try:
+        global conn
+        attempt = 0
+        while attempt < 100:
+            logging.info('connection attempt {}'.format(attempt))
+            conn = Connection(ip, user, connect_kwargs={'key_filename': pkey})
+            try:
+                conn.run('ls')
+                return conn
+            except Exception as ex:
+                logging.error(ex)
+                traceback.print_exc()
+                attempt += 1
+                time.sleep(10)
+    except:
+        sys.exit(1)
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org