]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add oslo db retry decorator to the RPC handlers
authorOleg Bondarev <obondarev@mirantis.com>
Thu, 30 Jul 2015 16:24:38 +0000 (19:24 +0300)
committerOleg Bondarev <obondarev@mirantis.com>
Mon, 3 Aug 2015 10:41:05 +0000 (13:41 +0300)
commit272768caddb17617e4b5af960075d07a623cd8ca
tree2084c425c16f46baffb31ea9ad28513146f7d8ff
parent9c71544c3bf4b1760607788cb7a9b52ebff01779
Add oslo db retry decorator to the RPC handlers

The decorator was previously added at the API layer
(commit 4e77442d529d9803ff90de905b846af940eaf382,
commit d04335c448aa15cf9e1902e22ed4cd17b6ed344b).
However some RPC handlers are also dealing with port
create/update/delete operations, like dhcp ports for example.
We need to cover these cases too.

Also remove db retry from ml2 plugin delete_port()
as it's not needed once we retry at the API and RPC layers.
(there is already a unit test on this)

The patch also adds a unit test for checking deadlock
handling during port creation at API layer.
Though it's not directly related to the current fix,
I decided to leave it for regression preventing purposes.

Closes-Bug: #1479738
Change-Id: I7793a8f7c37ca542b8bc12372168aaaa0826ac4c
neutron/api/rpc/handlers/dhcp_rpc.py
neutron/api/rpc/handlers/l3_rpc.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/plugins/ml2/test_plugin.py