From 28e72646a7f5ffaddcae150fd6e04863ec770315 Mon Sep 17 00:00:00 2001 From: asarfaty Date: Sun, 19 Jul 2020 18:04:10 +0200 Subject: [PATCH] MP2P migration: Wait for gateway firewall runtime status success before deleting the old edge firewall rules Change-Id: I9612372d466507df8c68bed6c423503d0e1a9c18 --- vmware_nsx/shell/admin/plugins/nsxv3/resources/migration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/shell/admin/plugins/nsxv3/resources/migration.py b/vmware_nsx/shell/admin/plugins/nsxv3/resources/migration.py index 70b1e387db..d7cb5487ff 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv3/resources/migration.py +++ b/vmware_nsx/shell/admin/plugins/nsxv3/resources/migration.py @@ -1355,8 +1355,10 @@ def post_migration_actions(nsxlib, nsxpolicy, nsxpolicy_admin, plugin): # Remove old rules from the default sections for section in nsx_router_sections: # make sure the policy section was already realized - nsxpolicy.gateway_policy.wait_until_realized( - policy_constants.DEFAULT_DOMAIN, section['router_id']) + # with runtime_status=SUCESS + nsxpolicy.gateway_policy.wait_until_state_sucessful( + policy_constants.DEFAULT_DOMAIN, section['router_id'], + max_attempts=600, with_refresh=True) nsxlib.firewall_section.update( section['id'], rules=[section['default_rule']]) LOG.debug("Deleted MP edge FW section %s rules", section['id'])