Merge "NSX|P: Disable API passthrough for enable_standby_relocation" into stable/stein

This commit is contained in:
Zuul 2019-04-10 19:34:59 +00:00 committed by Gerrit Code Review
commit 3b36f52f4b
1 changed files with 14 additions and 16 deletions

View File

@ -1384,14 +1384,13 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
LOG.error("Tier0 %s does not have an edge cluster",
tier0_uuid)
if cfg.CONF.nsx_p.allow_passthrough:
try:
# Enable standby relocation on this router
self.nsxpolicy.tier1.set_standby_relocation(
router['id'], enable_standby_relocation=True)
except Exception as ex:
LOG.warning("Failed to enable standby relocation for router "
"%s: %s", router['id'], ex)
try:
# Enable standby relocation on this router
self.nsxpolicy.tier1.set_standby_relocation(
router['id'], enable_standby_relocation=True)
except Exception as ex:
LOG.warning("Failed to enable standby relocation for router "
"%s: %s", router['id'], ex)
# update firewall rules (there might be FW group waiting for a
# service router)
@ -1399,14 +1398,13 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
self.update_router_firewall(context, router_id)
def delete_service_router(self, project_id, router_id):
if cfg.CONF.nsx_p.allow_passthrough:
try:
# Disable standby relocation on this router
self.nsxpolicy.tier1.set_standby_relocation(
router_id, enable_standby_relocation=False)
except Exception as ex:
LOG.warning("Failed to disable standby relocation for router "
"%s: %s", router_id, ex)
try:
# Disable standby relocation on this router
self.nsxpolicy.tier1.set_standby_relocation(
router_id, enable_standby_relocation=False)
except Exception as ex:
LOG.warning("Failed to disable standby relocation for router "
"%s: %s", router_id, ex)
# remove the edge firewall
if self.fwaas_callbacks and self.fwaas_callbacks.fwaas_enabled: