]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
NSX: Fix KeyError in sync if nsx_router_id not found
authorAaron Rosen <aaronorosen@gmail.com>
Tue, 8 Apr 2014 20:20:49 +0000 (13:20 -0700)
committerAaron Rosen <aaronorosen@gmail.com>
Wed, 9 Apr 2014 01:28:18 +0000 (18:28 -0700)
commit422e6e9a0eef379315f3404304e65583e8b65f92
tree6f988ddbe350ba3ff02ac0e8e0546cc602ac0440
parent528544502e9118f81bab6984447018c62142aab3
NSX: Fix KeyError in sync if nsx_router_id not found

Previously, a KeyError would occur in the sync code which would
cause the sync thread to stop running. This would occur if there
was a router entry in the database but no nsx_router_mapping and
the router was not found in nsx. Note: this should never happen unless
one did not run the db migration which introduced and migrated the data
for the NeutronNsxRouterMapping table.

(cherry picked from commit d90d71cfdae1d9c9c3b54cc33adfabce683c633c)
Change-Id: I44f3e7de9323f594501db63d3ad33e80e617bfdc
Closes-bug: #1304647
neutron/plugins/vmware/common/sync.py
neutron/tests/unit/vmware/test_nsx_sync.py