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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
