Key error in l3_dvr_db

Bug #1355409 reported by Eugene Nikanorov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Armando Migliaccio

Bug Description

The following stack trace observed in the gate:

ERROR oslo.messaging.rpc.dispatcher [req-110db567-3322-4922-95c8-a54d166c8ead ] Exception during message handling: u'b132e9da-3ee2-47ac-9ed5-f04ca73c01d1'
TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
TRACE oslo.messaging.rpc.dispatcher incoming.message))
TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/new/neutron/neutron/db/l3_rpc_base.py", line 57, in sync_routers
TRACE oslo.messaging.rpc.dispatcher context, host, router_ids)
TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/new/neutron/neutron/db/l3_agentschedulers_db.py", line 191, in list_active_sync_routers_on_active_l3_agent
TRACE oslo.messaging.rpc.dispatcher active=True)
TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/new/neutron/neutron/db/l3_dvr_db.py", line 306, in get_sync_data
TRACE oslo.messaging.rpc.dispatcher DEVICE_OWNER_DVR_INTERFACE])
TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 1016, in _get_router_info_list
TRACE oslo.messaging.rpc.dispatcher active=active)
TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/new/neutron/neutron/db/l3_db.py", line 919, in _get_sync_routers
TRACE oslo.messaging.rpc.dispatcher return self._build_routers_list(context, router_dicts, gw_ports)
TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/new/neutron/neutron/db/l3_dvr_db.py", line 241, in _build_routers_list
TRACE oslo.messaging.rpc.dispatcher rtr['gw_port'] = gw_ports[gw_port_id]
TRACE oslo.messaging.rpc.dispatcher KeyError: u'b132e9da-3ee2-47ac-9ed5-f04ca73c01d1'a

Link: http://logs.openstack.org/48/112948/3/check/check-tempest-dsvm-neutron-pg/503d619/logs/screen-q-svc.txt.gz?#_2014-08-11_07_19_33_893

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :
tags: added: l3-dvr-backlog
removed: db l3-ipam-dhcp
tags: added: db l3-ipam-dhcp
removed: l3-dvr-backlog
Changed in neutron:
status: New → Confirmed
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/113400

Changed in neutron:
assignee: Eugene Nikanorov (enikanorov) → Armando Migliaccio (armando-migliaccio)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/113441

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/113580

Changed in neutron:
milestone: none → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

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

commit fe49457605f96184d1fb334208d1ba57f513152a
Author: armando-migliaccio <email address hidden>
Date: Mon Aug 11 16:15:28 2014 -0700

    Make plugin and l3plugin available as mixin's properties

    This makes the code simpler and slightly more efficient.
    This is a minor refactoring related to a race condition
    observed when the agent is processing a router while its
    interfaces are being removed.

    Related-bug: #1355409

    Change-Id: Ic0ce25aa6a977e28b1ab76081c74da4c46c2ca6b

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/113441
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2affc39d3ad2d30c54e3373249446f61ee59f881
Submitter: Jenkins
Branch: master

commit 2affc39d3ad2d30c54e3373249446f61ee59f881
Author: armando-migliaccio <email address hidden>
Date: Mon Aug 11 22:43:31 2014 -0700

    Fix PortNotFound exception during sync_routers

    This trace is observed when an L3 agent invokes
    sync_routers right about the same time a port
    interface is removed from a router.

    Related-bug: #1355409

    Change-Id: I825b25080cbf054462318fc01248692b9e0e4ecb

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit aee5344db7972e2e12ed056c2e6467f7952aec3f
Author: armando-migliaccio <email address hidden>
Date: Tue Aug 12 09:11:50 2014 -0700

    Fix KeyError during sync_routers

    Method sync_routers is used by the L3 agent to query
    routers it knows about. Routers and GW ports lists
    are populated in two different times, which means that
    they can be interleaved by a delete request which
    results in gateway ports being missing in one of the
    two data structures.

    This patch takes care of the race condition.

    Closes-bug: #1355409

    Change-Id: Id3a6fe145058f690e107bfe7023980ede61cff90

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.2
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.