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/01/22 07:40:37 UTC
[incubator-datalab] branch DATALAB-2091 updated (529f82c -> aec9af9)
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 529f82c [DATALAB-2091]: fixed UnicodeDecodeError during python lib installation
new 68a8d46 [DATALAB-2091]: changed back except in ensure_pip function
new aec9af9 [DATALAB-2091]: changed usage of python to python3 in some scripts
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:
infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py | 2 +-
infrastructure-provisioning/src/general/lib/os/fab.py | 7 ++-----
.../src/general/lib/os/redhat/notebook_lib.py | 4 ++--
infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py | 2 +-
infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py | 2 +-
5 files changed, 7 insertions(+), 10 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]: changed usage of python
to python3 in some scripts
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 aec9af905d184d8aa46135f73fc0c4dcc3849d57
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Jan 22 09:40:17 2021 +0200
[DATALAB-2091]: changed usage of python to python3 in some scripts
---
infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py | 2 +-
infrastructure-provisioning/src/general/lib/os/fab.py | 2 +-
infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py | 4 ++--
infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py | 2 +-
infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
index 5968aa2..b3cc6b3 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -331,7 +331,7 @@ def start_ss(keyfile, host_string, datalab_conf_dir, web_path,
keycloak_client_id,
keycloak_client_secret,
keycloak_auth_server_url)
- sudo('python /tmp/configure_billing.py {}'.format(params))
+ sudo('python3 /tmp/configure_billing.py {}'.format(params))
try:
if os.environ['conf_stepcerts_enabled'] == 'true':
sudo(
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 7499c23..74f966d 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -186,7 +186,7 @@ def put_resource_status(resource, status, datalab_path, os_user, hostname):
keyfile = os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem"
env.key_filename = [keyfile]
env.host_string = os_user + '@' + hostname
- sudo('python ' + datalab_path + 'tmp/resource_status.py --resource {} --status {}'.format(resource, status))
+ sudo('python3 ' + datalab_path + 'tmp/resource_status.py --resource {} --status {}'.format(resource, status))
def configure_jupyter(os_user, jupyter_conf_file, templates_dir, jupyter_version, exploratory_name):
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
index 39565c7..93a45f0 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/notebook_lib.py
@@ -48,7 +48,7 @@ def enable_proxy(proxy_host, proxy_port):
def downgrade_python_version():
try:
- sudo('python -c "import os,sys,yum; yb = yum.YumBase(); pl = yb.doPackageLists(); \
+ sudo('python3 -c "import os,sys,yum; yb = yum.YumBase(); pl = yb.doPackageLists(); \
version = [pkg.vr for pkg in pl.installed if pkg.name == \'python\']; \
os.system(\'yum -y downgrade python python-devel-2.7.5-58.el7.x86_64 python-libs-2.7.5-58.el7.x86_64\') \
if version != [] and version[0] == \'2.7.5-68.el7\' else False"')
@@ -417,7 +417,7 @@ def get_available_os_pkgs():
try:
manage_pkg('update-minimal --security -y --skip-broken', 'remote', '')
downgrade_python_version()
- yum_raw = sudo('python -c "import os,sys,yum; yb = yum.YumBase(); pl = yb.doPackageLists(); print {pkg.name:pkg.vr for pkg in pl.available}"')
+ yum_raw = sudo('python3 -c "import os,sys,yum; yb = yum.YumBase(); pl = yb.doPackageLists(); print {pkg.name:pkg.vr for pkg in pl.available}"')
yum_re = re.sub\
(r'\w*\s\w*\D\s\w*.\w*.\s\w*.\w*.\w.\w*.\w*.\w*', '', yum_raw)
yum_list = yum_re.replace("'", "\"")
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
index 16af9bd..909e7b8 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
@@ -344,7 +344,7 @@ def start_ss(keyfile, host_string, datalab_conf_dir, web_path,
keycloak_client_id,
keycloak_client_secret,
keycloak_auth_server_url)
- sudo('python /tmp/configure_billing.py {}'.format(params))
+ sudo('python3 /tmp/configure_billing.py {}'.format(params))
try:
if os.environ['conf_stepcerts_enabled'] == 'true':
diff --git a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
index 7b188ac..06a1674 100644
--- a/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
+++ b/infrastructure-provisioning/terraform/bin/deploy/endpoint_fab.py
@@ -292,7 +292,7 @@ def ensure_mongo_endpoint():
conn.sudo('sed -i "s|PASSWORD|{}|g" /tmp/configure_mongo.py'.format(args.mongo_password))
if not exists(conn, '/tmp/mongo_roles.json'):
conn.put('./mongo_files/gcp/mongo_roles.json', '/tmp/mongo_roles.json')
- conn.sudo('python /tmp/configure_mongo.py')
+ conn.sudo('python3 /tmp/configure_mongo.py')
except Exception as err:
logging.error('Failed to install Mongo: ', str(err))
traceback.print_exc()
---------------------------------------------------------------------
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 back except in
ensure_pip function
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 68a8d460d98f5ad651c721210d74ae402332fa66
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Jan 22 09:37:39 2021 +0200
[DATALAB-2091]: changed back except in ensure_pip function
---
infrastructure-provisioning/src/general/lib/os/fab.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 09d1c26..7499c23 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -46,10 +46,7 @@ def ensure_pip(requisites):
sudo('pip3 install --upgrade setuptools')
sudo('pip3 install -UI {} --no-cache-dir'.format(requisites))
sudo('touch /home/{}/.ensure_dir/pip_path_added'.format(os.environ['conf_os_user']))
- except Exception as err:
- logging.info(
- "Unable to ensure_pip: " + str(err) + "\n Traceback: " + traceback.print_exc(file=sys.stdout))
- traceback.print_exc(file=sys.stdout)
+ except:
sys.exit(1)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org