You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/27 14:11:17 UTC

[incubator-dlab] branch DLAB-1980 updated: [DLAB-1980]: added check whether /opt/{cluster_dir} exists for gcp and azure

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

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


The following commit(s) were added to refs/heads/DLAB-1980 by this push:
     new 18c6d1f  [DLAB-1980]: added check whether /opt/{cluster_dir} exists for gcp and azure
18c6d1f is described below

commit 18c6d1f5c360d8bb822029178808efd774d84205
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Aug 27 16:57:47 2020 +0300

    [DLAB-1980]: added check whether /opt/{cluster_dir} exists for gcp and azure
---
 infrastructure-provisioning/src/general/lib/azure/actions_lib.py | 5 ++++-
 infrastructure-provisioning/src/general/lib/gcp/actions_lib.py   | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
index 761be9c..ba00ab8 100644
--- a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
@@ -1169,7 +1169,10 @@ def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, datalake_ena
                                              cluster_name, cluster_dir), capture=True)
         for property in additional_spark_properties.split('\n'):
             local('echo "{0}" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(property, cluster_name))
-    local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
+    if os.path.exists('{0}'.format(cluster_dir)):
+        print('=========')
+        local('ls -la /opt/')
+        local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
                                                                                                         cluster_dir))
     if datalake_enabled == 'false':
         local('cp -f /opt/spark/conf/core-site.xml {}spark/conf/'.format(cluster_dir))
diff --git a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
index e550d9d..5ecfdf0 100644
--- a/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/gcp/actions_lib.py
@@ -1520,7 +1520,8 @@ def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, datalake_ena
                                              cluster_name, cluster_dir), capture=True)
         for property in additional_spark_properties.split('\n'):
             local('echo "{0}" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(property, cluster_name))
-    local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
+    if os.path.exists('{0}'.format(cluster_dir)):
+        local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf  {1}spark/conf/spark-defaults.conf'.format(cluster_name,
                                                                                                         cluster_dir))
     local('cp -f /opt/spark/conf/core-site.xml {}spark/conf/'.format(cluster_dir))
     if spark_configs:


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