← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1383495] [NEW] L3 agent attempts to disable RA on all interfaces when it should only do so on qrouter namespaces for now

 

Public bug reported:

Disableing RA only works on qrouter- namespaces at the moment but the L3
agent is attempting to disable it on all namespaces.  In other
namespaces, it assumes qrouter- is the prefix of the namespace name and
incorrectly computes the router id.

    def _cleanup_namespaces(self, router_namespaces, router_ids):
        """Destroy stale router namespaces on host when L3 agent restarts

        The argument router_namespaces is the list of all routers namespaces
        The argument router_ids is the list of ids for known routers.
        """
        # Don't destroy namespaces of routers this agent handles.
        ns_to_ignore = self._get_routers_namespaces(router_ids)

        ns_to_destroy = router_namespaces - ns_to_ignore
        for ns in ns_to_destroy:
            ra.disable_ipv6_ra(ns[len(NS_PREFIX):], ns, self.root_helper)  <----- Wrong place for this
            try:
                self._destroy_namespace(ns)
            except RuntimeError:
                LOG.exception(_('Failed to destroy stale router namespace '
                                '%s'), ns)

I also noticed that disable_ipv6_ra is not called in some situation
where _destroy_router_namespace can be called.  If it is important to
disable_ipv6_ra for router namespaces then this call should be moved to
_destroy_router_namespace.

** Affects: neutron
     Importance: Medium
     Assignee: Carl Baldwin (carl-baldwin)
         Status: In Progress

** Changed in: neutron
   Importance: Undecided => Medium

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

Title:
  L3 agent attempts to disable RA on all interfaces when it should only
  do so on qrouter namespaces for now

Status in OpenStack Neutron (virtual network service):
  In Progress

Bug description:
  Disableing RA only works on qrouter- namespaces at the moment but the
  L3 agent is attempting to disable it on all namespaces.  In other
  namespaces, it assumes qrouter- is the prefix of the namespace name
  and incorrectly computes the router id.

      def _cleanup_namespaces(self, router_namespaces, router_ids):
          """Destroy stale router namespaces on host when L3 agent restarts

          The argument router_namespaces is the list of all routers namespaces
          The argument router_ids is the list of ids for known routers.
          """
          # Don't destroy namespaces of routers this agent handles.
          ns_to_ignore = self._get_routers_namespaces(router_ids)

          ns_to_destroy = router_namespaces - ns_to_ignore
          for ns in ns_to_destroy:
              ra.disable_ipv6_ra(ns[len(NS_PREFIX):], ns, self.root_helper)  <----- Wrong place for this
              try:
                  self._destroy_namespace(ns)
              except RuntimeError:
                  LOG.exception(_('Failed to destroy stale router namespace '
                                  '%s'), ns)

  I also noticed that disable_ipv6_ra is not called in some situation
  where _destroy_router_namespace can be called.  If it is important to
  disable_ipv6_ra for router namespaces then this call should be moved
  to _destroy_router_namespace.

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


Follow ups

References