From 3567667f512b87eb5390eb420d496c1d864d2006 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Wed, 15 Mar 2017 12:56:21 -0700 Subject: [PATCH] Get rid of custom wrap_db_retry call in sync_allocations Just for consistency, get rid of the last direct call to wrap_db_retry and instead use neutron.db.api.retry_db_errors in the sync_allocations code so we don't potentially get bitten by slight inconsistencies between the two. TrivialFix Related-Bug: #1673243 Change-Id: I975c7d0ec84698d277acbbec6d9cfec5c03439aa (cherry picked from commit 99e5f4fb4680082407f6c38bad6b7345696e5e9f) (cherry picked from commit 9096ea2805a8db07223b05d0f8c805bb568cdef9) --- neutron/plugins/ml2/drivers/type_tunnel.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/neutron/plugins/ml2/drivers/type_tunnel.py b/neutron/plugins/ml2/drivers/type_tunnel.py index 31abab5f16e..580553d940b 100644 --- a/neutron/plugins/ml2/drivers/type_tunnel.py +++ b/neutron/plugins/ml2/drivers/type_tunnel.py @@ -19,7 +19,6 @@ import operator import netaddr from neutron_lib import exceptions as exc from oslo_config import cfg -from oslo_db import api as oslo_db_api from oslo_db import exception as db_exc from oslo_log import log import six @@ -139,9 +138,7 @@ class TunnelTypeDriver(helpers.SegmentTypeDriver): LOG.info(_LI("%(type)s ID ranges: %(range)s"), {'type': self.get_type(), 'range': current_range}) - @oslo_db_api.wrap_db_retry( - max_retries=db_api.MAX_RETRIES, - exception_checker=db_api.is_retriable) + @db_api.retry_db_errors def sync_allocations(self): # determine current configured allocatable tunnel ids tunnel_ids = set()