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

lfrolov pushed a commit to branch DLAB-1644
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit f60cf700180baf04a478c9681c94c7f8745a6089
Author: leonidfrolov <[email protected]>
AuthorDate: Tue Mar 31 17:08:02 2020 +0300

    [DLAB-1644]: fixed remote spark kernel removal for computational name that 
contains upper-case
---
 infrastructure-provisioning/src/general/lib/gcp/actions_lib.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
index 9ea0d80..ed82c89 100644
--- a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
@@ -1406,6 +1406,7 @@ def configure_local_spark(jars_dir, templates_dir, 
memory_type='driver'):
 
 def remove_dataengine_kernels(notebook_name, os_user, key_path, cluster_name):
     try:
+        computational_name = os.environ['computational_name'].replace('_', 
'-').lower()
         private = meta_lib.get_instance_private_ip_address(cluster_name, 
notebook_name)
         env.hosts = "{}".format(private)
         env.user = "{}".format(os_user)
@@ -1454,7 +1455,7 @@ def remove_dataengine_kernels(notebook_name, os_user, 
key_path, cluster_name):
             sudo('sleep 5')
             sudo('rm -rf 
/home/{}/.ensure_dir/dataengine_{}_interpreter_ensured'.format(os_user, 
cluster_name))
         if 
exists('/home/{}/.ensure_dir/rstudio_dataengine_ensured'.format(os_user)):
-            
dlab.fab.remove_rstudio_dataengines_kernel(os.environ['computational_name'], 
os_user)
+            dlab.fab.remove_rstudio_dataengines_kernel(computational_name, 
os_user)
         sudo('rm -rf  /opt/' + cluster_name + '/')
         print("Notebook's {} kernels were removed".format(env.hosts))
     except Exception as err:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to