← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1927926] [NEW] Ha port is not cleared when cleanup l3router ns

 

Public bug reported:

Before deleting RouterNamespace, the related netdev device will be delted.
But only the prefixes 'rfp-' and 'qr-' and 'qg-' are deleted, 'ha-' has not been deleted.

Because the ha device is not deleted, fd will continue to increase, If
the time is too long, ovs will fail due to the limit of fd.

** Affects: neutron
     Importance: Undecided
         Status: New

** Description changed:

  Before deleting RouterNamespace, the related netdev device will be delted.
  But only the prefixes 'rfp-' and 'qr-' and 'qg-' are deleted, 'ha-' has not been deleted.
  
- Because the ha device is not deleted, fd will continue to increase,
- If the time is too long, ovs will fail due to the limit of fd.
+ Because the ha device is not deleted, fd will continue to increase, If
+ the time is too long, ovs will fail due to the limit of fd.

** Description changed:

  Before deleting RouterNamespace, the related netdev device will be delted.
  But only the prefixes 'rfp-' and 'qr-' and 'qg-' are deleted, 'ha-' has not been deleted.
  
  Because the ha device is not deleted, fd will continue to increase, If
  the time is too long, ovs will fail due to the limit of fd.
+ 
+ ```
+ class RouterNamespace(Namespace):
+ 
+     def __init__(self, router_id, agent_conf, driver, use_ipv6):
+         self.router_id = router_id
+         name = self._get_ns_name(router_id)
+         super(RouterNamespace, self).__init__(
+             name, agent_conf, driver, use_ipv6)
+ 
+     @classmethod
+     def _get_ns_name(cls, router_id):
+         return build_ns_name(NS_PREFIX, router_id)
+ 
+     @check_ns_existence
+     def delete(self):
+         ns_ip = ip_lib.IPWrapper(namespace=self.name)
+         for d in ns_ip.get_devices():
+             if d.name.startswith(INTERNAL_DEV_PREFIX):
+                 # device is on default bridge
+                 self.driver.unplug(d.name, namespace=self.name,
+                                    prefix=INTERNAL_DEV_PREFIX)
+             elif d.name.startswith(ROUTER_2_FIP_DEV_PREFIX):
+                 ns_ip.del_veth(d.name)
+             elif d.name.startswith(EXTERNAL_DEV_PREFIX):
+                 self.driver.unplug(
+                     d.name,
+                     namespace=self.name,
+                     prefix=EXTERNAL_DEV_PREFIX)
+ 
+         super(RouterNamespace, self).delete()
+ ```

** Description changed:

  Before deleting RouterNamespace, the related netdev device will be delted.
  But only the prefixes 'rfp-' and 'qr-' and 'qg-' are deleted, 'ha-' has not been deleted.
  
  Because the ha device is not deleted, fd will continue to increase, If
  the time is too long, ovs will fail due to the limit of fd.
- 
- ```
- class RouterNamespace(Namespace):
- 
-     def __init__(self, router_id, agent_conf, driver, use_ipv6):
-         self.router_id = router_id
-         name = self._get_ns_name(router_id)
-         super(RouterNamespace, self).__init__(
-             name, agent_conf, driver, use_ipv6)
- 
-     @classmethod
-     def _get_ns_name(cls, router_id):
-         return build_ns_name(NS_PREFIX, router_id)
- 
-     @check_ns_existence
-     def delete(self):
-         ns_ip = ip_lib.IPWrapper(namespace=self.name)
-         for d in ns_ip.get_devices():
-             if d.name.startswith(INTERNAL_DEV_PREFIX):
-                 # device is on default bridge
-                 self.driver.unplug(d.name, namespace=self.name,
-                                    prefix=INTERNAL_DEV_PREFIX)
-             elif d.name.startswith(ROUTER_2_FIP_DEV_PREFIX):
-                 ns_ip.del_veth(d.name)
-             elif d.name.startswith(EXTERNAL_DEV_PREFIX):
-                 self.driver.unplug(
-                     d.name,
-                     namespace=self.name,
-                     prefix=EXTERNAL_DEV_PREFIX)
- 
-         super(RouterNamespace, self).delete()
- ```

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1927926

Title:
  Ha port is not cleared when cleanup l3router ns

Status in neutron:
  New

Bug description:
  Before deleting RouterNamespace, the related netdev device will be delted.
  But only the prefixes 'rfp-' and 'qr-' and 'qg-' are deleted, 'ha-' has not been deleted.

  Because the ha device is not deleted, fd will continue to increase, If
  the time is too long, ovs will fail due to the limit of fd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1927926/+subscriptions


Follow ups