Merge "Remove sleep command when retrieving OVS dp" into stable/queens

This commit is contained in:
Zuul 2020-02-18 17:59:04 +00:00 committed by Gerrit Code Review
commit 9ed170f9b5
1 changed files with 2 additions and 3 deletions

View File

@ -60,14 +60,13 @@ class OpenFlowSwitchMixin(object):
dp = ofctl_api.get_datapath(self._app, dpid_int)
if dp is not None:
break
# The switch has not established a connection to us.
# Wait for a little.
# The switch has not established a connection to us; retry again
# until timeout.
if timeutils.now() > start_time + timeout_sec:
m = _("Switch connection timeout")
LOG.error(m)
# NOTE(yamamoto): use RuntimeError for compat with ovs_lib
raise RuntimeError(m)
eventlet.sleep(1)
return dp
def _send_msg(self, msg, reply_cls=None, reply_multi=False):