]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
ML2: move L3 cleanup out of network transaction
authorKevin Benton <blak111@gmail.com>
Tue, 30 Sep 2014 03:21:23 +0000 (20:21 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 30 Sep 2014 15:38:53 +0000 (08:38 -0700)
commit36e8cbb34e78ff367cb501b8c494d9a02228251d
tree102d075a3343706cda1dd5a5e583afe6a66b735c
parentdd238d0aac25ffec2734c75a7f893040ec42eb7b
ML2: move L3 cleanup out of network transaction

Move _process_l3_delete out of the delete_network
transaction to eliminate the semaphore deadlock that
occurs when it tries to delete the ports associated
with existing floating IPs.

It makes more sense to live outside of the transaction
anyway because the operations it performs cannot be
rolled back only in the database if the L3 plugin makes
external calls for floating IP creation/deletion.
e.g. if delete_floatingip is successful, it may have
deleted external resources and restoring the DB records
would make things inconsistent.

If a failure to delete the network does occur, any cleanup
done by _process_l3_delete will not be reversed.

Closes-Bug: #1374573
Change-Id: I3ae7bb269df9b9dcef94f48f13f1bde1e4106a80
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/test_ml2_plugin.py