newly spawned agent isn't learned by neutron very quickly

Bug #1302838 reported by Aaron Rosen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rossella Sblendido

Bug Description

2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp Traceback (most recent call last):
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/openstack/common/rpc/amqp.py", line 438, in _process_data
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp **args)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/common/rpc.py", line 45, in dispatch
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp neutron_ctxt, version, method, namespace, **kwargs)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/openstack/common/rpc/dispatcher.py", line 172, in dispatch
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/db/dhcp_rpc_base.py", line 65, in get_active_networks_info
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp networks = self._get_active_networks(context, **kwargs)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/db/dhcp_rpc_base.py", line 45, in _get_active_networks
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp context, host)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/db/agentschedulers_db.py", line 179, in list_active_networks_on_active_dhcp_agent
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp context, constants.AGENT_TYPE_DHCP, host)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/db/agents_db.py", line 133, in _get_agent_by_type_and_host
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp host=host)
2014-04-04 13:37:34.168 TRACE neutron.openstack.common.rpc.amqp AgentNotFoundByTypeHost: Agent with agent_type=DHCP agent and host=arosen-desktop could not be found

Eventually the agent will be learned by neutron-server and this will go away.

Changed in neutron:
importance: Undecided → Medium
status: New → Triaged
tags: added: icehouse-backport-potential neutron-core
Revision history for this message
Rossella Sblendido (rossella-o) wrote :

The only fix I can think of it to catch the AgentNotFoundByTypeHost and return an empty set of networks, since for requests like 'list_active_networks_on_active_dhcp_agent' is clear that the agent was not learnt by Neutron yet so throwing the exception doesn't make much sense.

If the goal of this bug was to find a way of making Neutron learn an agent quicker...well this requires some brainstorming :)

Changed in neutron:
assignee: nobody → Rossella Sblendido (rossella-o)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/93290

Changed in neutron:
status: Triaged → In Progress
Changed in neutron:
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/93290
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7fa8d60f246d36d5eef9cd54dc706b9a77972259
Submitter: Jenkins
Branch: master

commit 7fa8d60f246d36d5eef9cd54dc706b9a77972259
Author: rossella <email address hidden>
Date: Fri May 9 17:51:25 2014 +0000

    Return no active network if the agent has not been learnt yet

    Sometimes the agent message to get the active networks is
    processed before the agent is learnt by Neutron. Neutron throws an
    error, but it should simply return no network

    Change-Id: I6da0ca578cfe1fe0885138a5e2da76278f791491
    Closes-bug: #1302838

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.2
Revision history for this message
Ante Karamatić (ivoks) wrote :

This is a candidate for 2014.1 cause I've reproduced it on it and the same fix applies.

tags: added: cts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.