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/04/21 14:31:28 UTC

[incubator-datalab] branch DATALAB-1724 updated: [DATALAB-1724]: moved route table removal to be after subnet removal

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

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


The following commit(s) were added to refs/heads/DATALAB-1724 by this push:
     new 2468b1a  [DATALAB-1724]: moved route table removal to be after subnet removal
2468b1a is described below

commit 2468b1aea6c9653b83d7053ff5e7388aed65ee36
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Apr 21 17:31:11 2021 +0300

    [DATALAB-1724]: moved route table removal to be after subnet removal
---
 .../src/general/scripts/aws/project_terminate.py            | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py b/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py
index 01ca47a..006710e 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py
@@ -82,13 +82,6 @@ def terminate_edge_node(tag_name, project_name, tag_value, nb_sg, edge_sg, de_sg
         datalab.fab.append_result("Failed to deregister images.", str(err))
         sys.exit(1)
 
-    print("Removing project route tables")
-    try:
-        datalab.actions_lib.remove_route_tables("Name", False, '{}-{}-{}-nat-rt'.format(service_base_name, project_name, endpoint_name))
-    except Exception as err:
-        datalab.fab.append_result("Failed to remove project route table.", str(err))
-        sys.exit(1)
-
     print("Removing security groups")
     try:
         datalab.actions_lib.remove_sgroups(emr_sg)
@@ -106,6 +99,12 @@ def terminate_edge_node(tag_name, project_name, tag_value, nb_sg, edge_sg, de_sg
         datalab.fab.append_result("Failed to remove subnets.", str(err))
         sys.exit(1)
 
+    print("Removing project route tables")
+    try:
+        datalab.actions_lib.remove_route_tables("Name", False, '{}-{}-{}-nat-rt'.format(service_base_name, project_name, endpoint_name))
+    except Exception as err:
+        datalab.fab.append_result("Failed to remove project route table.", str(err))
+        sys.exit(1)
 
 if __name__ == "__main__":
     local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['project_name'],

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