Wrap all update/delete l3_rpc handlers with retries

This is needed for mysql galera multimaster backends.

Closes-Bug: #1564144
Change-Id: Ia5a14d5ee91c6672d61904f669e9e845a7f262c9
(cherry picked from commit d8f0ee5ecd)
This commit is contained in:
Eugene Nikanorov 2016-03-30 08:36:58 -07:00 committed by Oleg Bondarev
parent 33c01f4d49
commit 9c58ae6a70
1 changed files with 3 additions and 0 deletions

View File

@ -219,6 +219,7 @@ class L3RpcCallback(object):
plugins = manager.NeutronManager.get_service_plugins()
return plugins.keys()
@db_api.retry_db_errors
def update_floatingip_statuses(self, context, router_id, fip_statuses):
"""Update operational status for a floating IP."""
with context.session.begin(subtransactions=True):
@ -273,6 +274,7 @@ class L3RpcCallback(object):
'host': host})
return agent_port
@db_api.retry_db_errors
def update_ha_routers_states(self, context, **kwargs):
"""Update states for HA routers.
@ -296,6 +298,7 @@ class L3RpcCallback(object):
{'subnet': {'cidr': prefix}}))
return updated_subnets
@db_api.retry_db_errors
def delete_agent_gateway_port(self, context, **kwargs):
"""Delete Floatingip agent gateway port."""
network_id = kwargs.get('network_id')