Browse Source

When VRRP is enabled, router interface deletion fails when used with subnet id

Fix is used to explicitly delete the router interfaces when using the subnet id option

Change-Id: I7a2e38e968e333c3e012b63e92295721b8e97070
tags/mitaka-eol^0
Ritesh Madapurath 3 years ago
parent
commit
0702534af6
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py

+ 6
- 0
networking_brocade/vdx/non_ampp/ml2driver/l3_router_plugin.py View File

@@ -292,12 +292,18 @@ class BrocadeSVIPlugin(router.L3RouterPlugin):
292 292
                   "router_id=%(router_id)s "
293 293
                   "interface_info=%(interface_info)r",
294 294
                   {'router_id': router_id, 'interface_info': interface_info})
295
+        remove_by_port, remove_by_subnet = (
296
+            self._validate_interface_info(interface_info, for_removal=True)
297
+        )
295 298
         with context.session.begin(subtransactions=True):
296 299
             info = super(BrocadeSVIPlugin, self).remove_router_interface(
297 300
                 context, router_id, interface_info)
298 301
 
299 302
         try:
300 303
             subnet = self._core_plugin._get_subnet(context, info['subnet_id'])
304
+            if self._svi['redundancy'] and remove_by_subnet:
305
+                self._core_plugin.delete_port(context, info['port_id'],
306
+                                              l3_port_check=False)
301 307
             cidr = subnet['cidr']
302 308
             net_addr, net_len = self.net_addr(cidr)
303 309
             gateway_ip = subnet['gateway_ip']

Loading…
Cancel
Save