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/15 13:52:39 UTC

[incubator-datalab] branch DATALAB-2091 updated (a13df0e -> 94636ef)

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 a13df0e  [DATALAB-2091]: added for testing
     new 930eb87  [DATALAB-2091]: changed how subprocess exitcode is obtained
     new 94636ef  [DATALAB-2091]: changed how connection is defined

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/base/scripts/create_ssh_user.py                  | 16 ++++++++--------
 .../src/general/scripts/gcp/ssn_configure.py             |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)


---------------------------------------------------------------------
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]: changed how subprocess exitcode is obtained

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 930eb877f8b8aceb38d3706505a3ffc26ff9bc0b
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Feb 15 14:57:38 2021 +0200

    [DATALAB-2091]: changed how subprocess exitcode is obtained
---
 infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
index 461b3b4..562871e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
@@ -150,7 +150,7 @@ if __name__ == "__main__":
 
         try:
             subprocess.run("~/scripts/{}.py {}".format('create_ssh_user', params), shell=True)
-            if subprocess.CompletedProcess.returncode != 0:
+            if subprocess.returncode != 0:
                 raise Exception
         except:
             traceback.print_exc()


---------------------------------------------------------------------
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]: changed how connection is defined

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 94636ef2706b1e16dda269fcfaacf05e5295a254
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Feb 15 15:52:26 2021 +0200

    [DATALAB-2091]: changed how connection is defined
---
 .../src/base/scripts/create_ssh_user.py                  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/infrastructure-provisioning/src/base/scripts/create_ssh_user.py b/infrastructure-provisioning/src/base/scripts/create_ssh_user.py
index 10add1b..c062e91 100644
--- a/infrastructure-provisioning/src/base/scripts/create_ssh_user.py
+++ b/infrastructure-provisioning/src/base/scripts/create_ssh_user.py
@@ -58,14 +58,14 @@ def init_datalab_connection(hostname, username, keyfile):
         attempt = 0
         while attempt < 10:
             print('connection attempt {}'.format(attempt))
-            with Connection(host = hostname, user = username, connect_kwargs={'key_filename': keyfile}) as conn:
-                try:
-                    conn.run('ls')
-                    return conn
-                except Exception as ex:
-                    traceback.print_exc()
-                    attempt += 1
-                    time.sleep(10)
+            conn = Connection(host = hostname, user = username, connect_kwargs={'key_filename': keyfile})
+            try:
+                conn.run('ls')
+                return conn
+            except Exception as ex:
+                traceback.print_exc()
+                attempt += 1
+                time.sleep(10)
     except:
         sys.exit(1)
 


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