Merge "Set the default ``Backend.lookup`` timeout to 2 seconds"

This commit is contained in:
Zuul 2021-06-04 23:20:11 +00:00 committed by Gerrit Code Review
commit 67c036e611
3 changed files with 8 additions and 2 deletions

View File

@ -78,7 +78,7 @@ oslo.versionedobjects==1.35.1
oslotest==3.2.0
osprofiler==2.3.0
ovs==2.10.0
ovsdbapp==1.7.0
ovsdbapp==1.10.0
packaging==20.4
Paste==2.0.2
PasteDeploy==1.5.0

View File

@ -39,6 +39,7 @@ from neutron.services.portforwarding import constants as pf_const
LOG = log.getLogger(__name__)
DEFAULT_LOOKUP_TIMEOUT = 2
# Override wait_for_change to not use a timeout so we always try to reconnect
@ -150,6 +151,11 @@ class Backend(ovs_idl.Backend):
% {'match': match, 'column': column, 'table': table})
raise RuntimeError(msg)
def lookup(self, table, record, default=ovs_idl._NO_DEFAULT,
timeout=DEFAULT_LOOKUP_TIMEOUT, notify_handler=None):
return super().lookup(table, record, default=default, timeout=timeout,
notify_handler=notify_handler)
class OvsdbConnectionUnavailable(n_exc.ServiceUnavailable):
message = _("OVS database connection to %(db_schema)s failed with error: "

View File

@ -45,7 +45,7 @@ oslo.versionedobjects>=1.35.1 # Apache-2.0
osprofiler>=2.3.0 # Apache-2.0
os-ken >= 0.3.0 # Apache-2.0
ovs>=2.10.0 # Apache-2.0
ovsdbapp>=1.7.0 # Apache-2.0
ovsdbapp>=1.10.0 # Apache-2.0
packaging>=20.4 # Apache-2.0
psutil>=5.3.0 # BSD
pyroute2>=0.5.13;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)