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 2021/01/22 08:40:55 UTC

[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]: added static ip removal in case of ssn config failure

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

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


The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
     new d0bafc8  [DATALAB-2091]: added static ip removal in case of ssn config failure
d0bafc8 is described below

commit d0bafc873bc70926e5fce4dbb5cbc43141f7b23e
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Jan 22 10:40:32 2021 +0200

    [DATALAB-2091]: added static ip removal in case of ssn config failure
---
 infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
index 593bfed..f15c53f 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
@@ -45,6 +45,7 @@ if __name__ == "__main__":
 
     def clear_resources():
         GCPActions.remove_instance(ssn_conf['instance_name'], ssn_conf['zone'])
+        GCPActions.remove_static_address(ssn_conf['static_address_name'], ssn_conf['region'])
         GCPActions.remove_service_account(ssn_conf['service_account_name'], ssn_conf['service_base_name'])
         GCPActions.remove_role(ssn_conf['role_name'])
         if not ssn_conf['pre_defined_firewall']:
@@ -72,6 +73,7 @@ if __name__ == "__main__":
         ssn_conf['service_base_name'] = os.environ['conf_service_base_name'] = datalab.fab.replace_multi_symbols(
             os.environ['conf_service_base_name'].replace('_', '-').lower()[:20], '-', True)
         ssn_conf['instance_name'] = '{}-ssn'.format(ssn_conf['service_base_name'])
+        ssn_conf['static_address_name'] = '{}-ssn-static-ip'.format(ssn_conf['service_base_name'])
         ssn_conf['role_name'] = '{}-{}-ssn-role'.format(ssn_conf['service_base_name'], ssn_conf['ssn_unique_index'])
         ssn_conf['region'] = os.environ['gcp_region']
         ssn_conf['zone'] = os.environ['gcp_zone']


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