From ef66d5e4f53a6cd1378661dff7b949f9c1a5bc6a Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Tue, 8 Jan 2019 13:20:43 +0200 Subject: [PATCH] NSX|P: Support router standby relocation Using the passthrough api Change-Id: I2f8b9e219b3162bc82889f5459342e9f9d9b1878 --- vmware_nsx/plugins/nsx_p/plugin.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vmware_nsx/plugins/nsx_p/plugin.py b/vmware_nsx/plugins/nsx_p/plugin.py index f7b64f921b..118d890164 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -1171,6 +1171,17 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): "gateway. Router:%s has been removed from " "DB and backend", router['id']) + + 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) + return self.get_router(context, router['id']) def delete_router(self, context, router_id):