neutron/neutron/tests
Ihar Hrachyshka 9c94d96031 Avoid notifying while inside transaction opened in delete_port()
delete_port() calls to disassociate_floatingips() while in transaction.
The latter method sends RPC notification which may result in eventlet
yield. If yield switches a thread to another one that tries to access
the same floating IP object in db as disassociate_floatingips() method
does, we're locked and get db timeout.

We should avoid calling to notifier while under transaction.

To achieve this, I introduce a do_notify argument that controls whether
notification is done by disassociate_floatingips() itself or delegated
to caller. Callers that call to disassociate_floatingips() from under
transactions should handle notifications on their own. For this,
disassociate_floatingips() returns a set of routers that require
notification.

Updated drivers to reflect new behaviour. Added unit test.

Conflicts:
	neutron/db/l3_db.py
	neutron/plugins/bigswitch/plugin.py
	neutron/plugins/nuage/plugin.py

Change-Id: I2411f2aa778ea088be416d062c4816c16f49d2bf
Closes-Bug: 1330955
(cherry picked from commit 876c2c25e1)
2014-07-26 11:19:15 +02:00
..
etc Service Type Framework refactoring 2013-07-25 21:47:30 +04:00
functional Fix bug:range() is not same in py3.x and py2.x 2014-03-11 16:44:47 +08:00
unit Avoid notifying while inside transaction opened in delete_port() 2014-07-26 11:19:15 +02:00
var Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
base.py Make plugin deallocation check optional 2014-07-03 13:15:44 -07:00
post_mortem_debug.py Add post-mortem debug option for tests 2013-12-10 03:56:50 +00:00
tools.py Replace mox in unit tests with mock 2013-11-18 22:17:14 +09:00