You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by my...@apache.org on 2020/02/24 14:07:45 UTC

[incubator-dlab] branch DLAB-1553 created (now f20f25d)

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

mykolabodnar pushed a change to branch DLAB-1553
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at f20f25d  [DLAB-1553]: [GCP] project local backet termination fixed

This branch includes the following new commits:

     new f20f25d  [DLAB-1553]: [GCP] project local backet termination fixed

The 1 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@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/01: [DLAB-1553]: [GCP] project local backet termination fixed

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

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

commit f20f25d12943ff4a03ea92d7437376fee5204654
Author: Mykola_Bodnar1 <bo...@gmail.com>
AuthorDate: Mon Feb 24 14:30:37 2020 +0200

    [DLAB-1553]: [GCP] project local backet termination fixed
---
 .../src/general/scripts/gcp/project_terminate.py                   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py b/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
index 570dcb7..57af4ad 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
@@ -28,7 +28,7 @@ import sys, time, os
 from dlab.actions_lib import *
 import requests
 
-def terminate_edge_node(project_name, service_base_name, region, zone):
+def terminate_edge_node(endpoint_name, project_name, service_base_name, region, zone):
     print("Terminating Dataengine-service clusters")
     try:
         labels = [
@@ -47,7 +47,7 @@ def terminate_edge_node(project_name, service_base_name, region, zone):
         sys.exit(1)
 
     print("Terminating EDGE and notebook instances")
-    base = '{}-{}'.format(service_base_name, project_name)
+    base = '{}-{}-{}'.format(service_base_name, project_name, endpoint_name)
     keys = ['edge', 'ps', 'ip', 'bucket', 'subnet']
     targets = ['{}-{}'.format(base, k) for k in keys]
     try:
@@ -137,6 +137,7 @@ if __name__ == "__main__":
     project_conf = dict()
     project_conf['service_base_name'] = (os.environ['conf_service_base_name']).lower().replace('_', '-')
     project_conf['project_name'] = (os.environ['project_name']).lower().replace('_', '-')
+    project_conf['endpoint_name'] = (os.environ['endpoint_name']).lower().replace('_', '-')
     project_conf['project_tag'] = (os.environ['project_name']).lower().replace('_', '-')
     project_conf['region'] = os.environ['gcp_region']
     project_conf['zone'] = os.environ['gcp_zone']
@@ -145,7 +146,7 @@ if __name__ == "__main__":
         logging.info('[TERMINATE EDGE]')
         print('[TERMINATE EDGE]')
         try:
-            terminate_edge_node(project_conf['project_name'], project_conf['service_base_name'],
+            terminate_edge_node(project_conf['endpoint_name'], project_conf['project_name'], project_conf['service_base_name'],
                                 project_conf['region'], project_conf['zone'])
         except Exception as err:
             traceback.print_exc()


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