]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix KeyError during sync_routers
authorarmando-migliaccio <armamig@gmail.com>
Tue, 12 Aug 2014 16:11:50 +0000 (09:11 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Wed, 13 Aug 2014 14:13:10 +0000 (07:13 -0700)
commitaee5344db7972e2e12ed056c2e6467f7952aec3f
tree7ffb6a02364c703f0dd11b6ccc85a97a3dc72a40
parent2affc39d3ad2d30c54e3373249446f61ee59f881
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
neutron/db/l3_db.py
neutron/db/l3_dvr_db.py
neutron/db/l3_gwmode_db.py
neutron/tests/unit/db/test_l3_dvr_db.py
neutron/tests/unit/test_extension_ext_gw_mode.py
neutron/tests/unit/test_l3_plugin.py