This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DATALAB-2372 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit b4ad6bf0f7a3237cd2228649cb9925a00270d351 Author: leonidfrolov <[email protected]> AuthorDate: Thu Aug 26 14:34:11 2021 +0300 [DATALAB-2538]: fixed variable check --- infrastructure-provisioning/src/general/lib/os/fab.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py index 4097882..f873b56 100644 --- a/infrastructure-provisioning/src/general/lib/os/fab.py +++ b/infrastructure-provisioning/src/general/lib/os/fab.py @@ -261,7 +261,7 @@ def put_resource_status(resource, status, datalab_path, os_user, hostname): def configure_jupyter(os_user, jupyter_conf_file, templates_dir, jupyter_version, exploratory_name): if not exists(conn,'/home/' + os_user + '/.ensure_dir/jupyter_ensured'): try: - if os.environ['conf_deeplearning_cloud_ami'] == 'false' or os.environ['application'] != 'deeplearning' or os.environ['conf_cloud_provider'] == azure: + if os.environ['conf_deeplearning_cloud_ami'] == 'false' or os.environ['application'] != 'deeplearning' or os.environ['conf_cloud_provider'] == 'azure': conn.sudo('pip3 install notebook=={} --no-cache-dir'.format(jupyter_version)) conn.sudo('pip3 install jupyter --no-cache-dir') conn.sudo('rm -rf {}'.format(jupyter_conf_file)) @@ -1140,12 +1140,15 @@ def init_datalab_connection(hostname, username, keyfile): 'key_filename': keyfile}) conn.config.run.echo = True try: - conn.run('ls') + conn.run('hostname') conn.config.run.echo = True return conn except: attempt += 1 time.sleep(10) + if attempt == 15: + print('Unable to establish connection') + raise Exception except: traceback.print_exc() sys.exit(1) \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
