]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix BadRequest error on add_router_interface for DVR
authorarmando-migliaccio <armamig@gmail.com>
Sat, 12 Sep 2015 19:07:35 +0000 (12:07 -0700)
committerarmando-migliaccio <armamig@gmail.com>
Sat, 12 Sep 2015 20:31:32 +0000 (13:31 -0700)
commitdafa61bd46b7eacbc708d17a3fa492de971d6dd2
tree3405e6fe5ed90d861030ed5442f4b4414b57d575
parent90e4a2693489785770cc75696b4fbd81fa916f05
Fix BadRequest error on add_router_interface for DVR

This operation for DVR is made of multiple steps, some of
which are not within the same DB transaction. For this
reason, if a failure occurs, the rollback will be partial.

This inconsistent state leads the retry logic to fail with
BadRequest, because the router is believed to be already
connected to the subnet.

To fix this condition, it is necessary to delete the port
should the DB deadlock occur.

Closes-bug: #1494114

Change-Id: Ia2a73d6f9d1e4746e761ad072d954e64267a3ad1
neutron/db/l3_dvr_db.py
neutron/tests/unit/db/test_l3_dvr_db.py