You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/04/04 07:58:29 UTC
[incubator-dlab] branch develop updated: [DLAB-77-551] Fixed image
creation issue for Tensor-Rstudio
This is an automated email from the ASF dual-hosted git repository.
omartushevskyi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new c1c4451 [DLAB-77-551] Fixed image creation issue for Tensor-Rstudio
new 04ccc64 Merge pull request #79 from Dyoma33/DLAB-77-dev
c1c4451 is described below
commit c1c445117791f43d77fa781a646b07d2f7715bc6
Author: Dyoma33 <de...@gmail.com>
AuthorDate: Thu Apr 4 10:50:30 2019 +0300
[DLAB-77-551] Fixed image creation issue for Tensor-Rstudio
---
.../general/scripts/gcp/tensor-rstudio_configure.py | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/tensor-rstudio_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/tensor-rstudio_configure.py
index d328bc6..19e605e 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/tensor-rstudio_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/tensor-rstudio_configure.py
@@ -192,20 +192,18 @@ if __name__ == "__main__":
try:
print('[CREATING IMAGE]')
primary_image_id = GCPMeta().get_image_by_name(notebook_config['expected_primary_image_name'])
- secondary_image_id = GCPMeta().get_image_by_name(notebook_config['expected_secondary_image_name'])
if primary_image_id == '':
print("Looks like it's first time we configure notebook server. Creating images.")
- primary_image_id = GCPActions().create_image_from_instance_disk(
- notebook_config['expected_primary_image_name'], 'primary',
+ image_id_list = GCPActions().create_image_from_instance_disks(
+ notebook_config['expected_primary_image_name'], notebook_config['expected_secondary_image_name'],
notebook_config['instance_name'], notebook_config['zone'])
- if primary_image_id != '':
- print("Image of primary disk was successfully created. It's ID is {}".format(primary_image_id))
- if secondary_image_id == '':
- secondary_image_id = GCPActions().create_image_from_instance_disk(
- notebook_config['expected_secondary_image_name'], 'secondary', notebook_config['instance_name'],
- notebook_config['zone'])
- if secondary_image_id != '':
- print("Image of secondary disk was successfully created. It's ID is {}".format(secondary_image_id))
+ if image_id_list and image_id_list[0] != '':
+ print("Image of primary disk was successfully created. It's ID is {}".format(image_id_list[0]))
+ else:
+ print(
+ "Looks like another image creating operation for your template have been started a moment ago.")
+ if image_id_list and image_id_list[1] != '':
+ print("Image of secondary disk was successfully created. It's ID is {}".format(image_id_list[1]))
except Exception as err:
print('Error: {0}'.format(err))
append_result("Failed creating image.", str(err))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org