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 2022/11/04 15:03:02 UTC

[incubator-datalab] branch DATALAB-3098 created (now b79d4b748)

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

lfrolov pushed a change to branch DATALAB-3098
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


      at b79d4b748 [DATALAB-3098]: added check in case of hdinsight cluster creation failure

This branch includes the following new commits:

     new 2f26faf8e [DATALAB-3098]: increased disk size for AWS tensor-rstudio template
     new b79d4b748 [DATALAB-3098]: added check in case of hdinsight cluster creation failure

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.



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


[incubator-datalab] 01/02: [DATALAB-3098]: increased disk size for AWS tensor-rstudio template

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-3098
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 2f26faf8ea622576a78a9950df1648165bb8f9b9
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Nov 4 16:55:03 2022 +0200

    [DATALAB-3098]: increased disk size for AWS tensor-rstudio template
---
 .../src/general/scripts/aws/common_prepare_notebook.py       | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
index 7f6eadafe..c45f4247c 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
@@ -83,14 +83,10 @@ if __name__ == "__main__":
                                                                       notebook_config['project_name'],
                                                                       notebook_config['endpoint_name'],
                                                                       notebook_config['exploratory_name'], args.uuid)
-        #notebook_config['primary_disk_size'] = (lambda x: '100' if x == 'deeplearning' else '16')(
-        #    os.environ['application'])
-        if os.environ['application'] == 'deeplearning':
-            notebook_config['primary_disk_size'] = '150'
-        elif os.environ['application'] == 'tensor':
-            notebook_config['primary_disk_size'] = '28'
-        else:
-            notebook_config['primary_disk_size'] = '16'
+
+        notebook_config['primary_disk_size'] = (lambda x: '150' if x == 'deeplearning' else
+        ('28' if x == 'tensor' or x == 'tensor-rstudio' else '16'))(os.environ['application'])
+
         notebook_config['role_profile_name'] = '{}-{}-{}-nb-de-profile'.format(
             notebook_config['service_base_name'], notebook_config['project_name'], notebook_config['endpoint_name'])
         notebook_config['security_group_name'] = '{}-{}-{}-nb-sg'.format(notebook_config['service_base_name'],


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


[incubator-datalab] 02/02: [DATALAB-3098]: added check in case of hdinsight cluster creation failure

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-3098
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit b79d4b748ec71cce50b63643c911b9f9ff24af1b
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Nov 4 17:01:29 2022 +0200

    [DATALAB-3098]: added check in case of hdinsight cluster creation failure
---
 infrastructure-provisioning/src/general/lib/azure/actions_lib.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
index 1bebb2f21..d5fc54792 100644
--- a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
@@ -1249,6 +1249,8 @@ class AzureActions:
                 time.sleep(30)
                 logging.info('The cluster is being provisioned... Please wait')
                 cluster = datalab.meta_lib.AzureMeta().get_hdinsight_cluster(resource_group_name, cluster_name)
+                if cluster.properties.cluster_state in 'Error|Unknown|TimedOut':
+                    raise Exception
             return result
         except Exception as err:
             logging.info(
@@ -1257,6 +1259,7 @@ class AzureActions:
             append_result(str({"error": "Unable to create HDInsight Spark cluster",
                                "error_message": str(err) + "\n Traceback: " + traceback.print_exc(
                                    file=sys.stdout)}))
+            AzureActions().terminate_hdinsight_cluster(resource_group_name, cluster_name)
             traceback.print_exc(file=sys.stdout)
 
     def terminate_hdinsight_cluster(self, resource_group_name, cluster_name):


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