neutron/neutron/tests/unit/ml2
Ihar Hrachyshka 876c2c25e1 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.

Change-Id: I2411f2aa778ea088be416d062c4816c16f49d2bf
Closes-Bug: 1330955
2014-07-05 15:55:18 +02:00
..
drivers Moved rpc_compat.py code back into rpc.py 2014-06-24 10:35:39 +02:00
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
_test_mech_agent.py ML2: Remove validate_port_binding() and unbind_port() 2014-03-20 10:03:46 -04:00
test_agent_scheduler.py Adds support for L3 routing/NAT as a service plugin 2013-09-11 12:12:10 +02:00
test_mech_hyperv.py Implement ML2 port binding 2013-09-03 18:05:20 -04:00
test_mech_linuxbridge.py Vxlan / L2population support to Linuxbridge Agent 2013-09-12 02:51:37 +02:00
test_mech_openvswitch.py Implement ML2 port binding 2013-09-03 18:05:20 -04:00
test_mechanism_fslsdn.py Freescale SDN Mechanism Driver for ML2 Plugin 2014-06-07 08:06:29 +05:30
test_mechanism_ncs.py Remove individual cfg.CONF.resets from tests 2014-03-17 12:34:56 -04:00
test_mechanism_odl.py Allow vlan type usage for OpenDaylight ml2 2014-05-19 18:38:15 +00:00
test_ml2_plugin.py Avoid notifying while inside transaction opened in delete_port() 2014-07-05 15:55:18 +02:00
test_port_binding.py Removed create_rpc_dispatcher methods 2014-06-20 20:44:37 +02:00
test_rpcapi.py Introduce bulk calls for get device details 2014-06-25 21:33:10 +00:00
test_security_group.py Removed create_rpc_dispatcher methods 2014-06-20 20:44:37 +02:00
test_type_flat.py validate flat networks physical name 2014-06-25 11:51:05 -07:00
test_type_gre.py Fix H302 violations in unit tests 2014-05-04 12:39:19 +02:00
test_type_local.py Add local type driver unittests 2014-06-03 21:59:34 +02:00
test_type_vlan.py Add vlan type driver unittests 2014-06-17 21:35:38 +00:00
test_type_vxlan.py Fix H302 violations in unit tests 2014-05-04 12:39:19 +02:00