This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch 2.5.1-tcpc-deployment
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/2.5.1-tcpc-deployment by this
push:
new bd34406 [DATALAB-2705]: added python3 kernel removal for tensor
bd34406 is described below
commit bd344066576779a15c18e5a4b40b75d6fb2297cf
Author: leonidfrolov <[email protected]>
AuthorDate: Wed Feb 16 16:42:57 2022 +0200
[DATALAB-2705]: added python3 kernel removal for tensor
---
infrastructure-provisioning/src/general/lib/os/fab.py | 1 +
infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py | 2 ++
2 files changed, 3 insertions(+)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py
b/infrastructure-provisioning/src/general/lib/os/fab.py
index 22215e6..a37d440 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -1119,6 +1119,7 @@ def remove_unexisting_kernel(os_user):
if not exists(conn,
'/home/{}/.ensure_dir/unexisting_kernel_removed'.format(os_user)):
try:
conn.sudo('jupyter-kernelspec remove -f python3')
+ conn.sudo('jupyter kernelspec uninstall python3', warn=True)
conn.sudo('touch
/home/{}/.ensure_dir/unexisting_kernel_removed'.format(os_user))
except Exception as err:
logging.error('Function remove_unexisting_kernel error:', str(err))
diff --git
a/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
b/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
index 3686231..ab88404 100644
--- a/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
+++ b/infrastructure-provisioning/src/tensor/scripts/configure_tensor_node.py
@@ -154,5 +154,7 @@ if __name__ == "__main__":
#POST INSTALLATION PROCESS
print("Updating pyOpenSSL library")
update_pyopenssl_lib(args.os_user)
+ print("Removing unexisting kernels")
+ remove_unexisting_kernel(args.os_user)
conn.close()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]