← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1401823] Re: if L3 agent is down, it should not schedule router on it

 

ok,  I agree with you, the 'get_routers' is a call() method!

** Changed in: neutron
       Status: Incomplete => Invalid

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

Title:
  if L3 agent is down, it should not schedule router on it

Status in OpenStack Neutron (virtual network service):
  Invalid

Bug description:
  
  when neutron server schedule routers, if l3 agent is down, it should not schedule router on it,

      def auto_schedule_routers(self, plugin, context, host, router_ids):
          l3_agent = plugin.get_enabled_agent_on_host(
              context, constants.AGENT_TYPE_L3, host)
          if not l3_agent:
              return False

  if l3 agent is down, the 'plugin.get_enabled_agent_on_host' should be
  None,

      def get_enabled_agent_on_host(self, context, agent_type, host):
          """Return agent of agent_type for the specified host."""
          query = context.session.query(Agent)
          query = query.filter(Agent.agent_type == agent_type,
                               Agent.host == host,
                               Agent.admin_state_up == sql.true())
          try:
              agent = query.one()
          except exc.NoResultFound:
              LOG.debug('No enabled %(agent_type)s agent on host '
                        '%(host)s' % {'agent_type': agent_type, 'host': host})
              return
          if self.is_agent_down(agent.heartbeat_timestamp):
              LOG.warn(_LW('%(agent_type)s agent %(agent_id)s is not active'),
                       {'agent_type': agent_type, 'agent_id': agent.id})
          return agent

  so,  ' if self.is_agent_down', it should return None

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


References