]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Race for l2pop when ports go up/down on same host
authorVivekanandan Narasimhan <vivekanandan.narasimhan@hp.com>
Tue, 23 Sep 2014 09:25:16 +0000 (02:25 -0700)
committerVivekanandan Narasimhan <vivekanandan.narasimhan@hp.com>
Tue, 14 Oct 2014 16:43:53 +0000 (09:43 -0700)
commit3cd2163d5105faad389bee5175ef446f0bb90289
tree3cd726a9f426295f8039486dd883cd0c997cb77f
parentf1f34e04836265e753924a3aadcaf3f1b1dc209e
Race for l2pop when ports go up/down on same host

With l2pop enabled, race exists in delete_port_postcommit
when both create/update_port and delete_port deal with
different ports on the same host, where such ports are
either the first (or) last on same network for that host.
This race happens outside the DB locking zones in
the respective methods of ML2 plugin.

To fix this, we have moved determination of
fdb_entries back to delete_port_postcommit and removed
delete_port_precommit altogether from l2pop mechanism
driver.  In order to accomodate dvr interfaces, we
are storing and re-using the mechanism-driver context
which hold dvr-port-binding information while
invoking delete_port_postcommit.  We loop through
dvr interface bindings invoking delete_port_postcommit
similar to delete_port_precommit.

Closes-Bug: #1372438
Change-Id: If0502f57382441fdb4510c81a89794f57a38e696
neutron/plugins/ml2/drivers/l2pop/mech_driver.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/drivers/test_l2population.py