Merge "Remove sleep command when retrieving OVS dp" into stable/rocky
This commit is contained in:
commit
e07186a0ec
|
@ -70,14 +70,13 @@ class OpenFlowSwitchMixin(object):
|
||||||
dp = ofctl_api.get_datapath(self._app, dpid_int)
|
dp = ofctl_api.get_datapath(self._app, dpid_int)
|
||||||
if dp is not None:
|
if dp is not None:
|
||||||
break
|
break
|
||||||
# The switch has not established a connection to us.
|
# The switch has not established a connection to us; retry again
|
||||||
# Wait for a little.
|
# until timeout.
|
||||||
if timeutils.now() > start_time + timeout_sec:
|
if timeutils.now() > start_time + timeout_sec:
|
||||||
m = _("Switch connection timeout")
|
m = _("Switch connection timeout")
|
||||||
LOG.error(m)
|
LOG.error(m)
|
||||||
# NOTE(yamamoto): use RuntimeError for compat with ovs_lib
|
# NOTE(yamamoto): use RuntimeError for compat with ovs_lib
|
||||||
raise RuntimeError(m)
|
raise RuntimeError(m)
|
||||||
eventlet.sleep(1)
|
|
||||||
return dp
|
return dp
|
||||||
|
|
||||||
def _send_msg(self, msg, reply_cls=None, reply_multi=False,
|
def _send_msg(self, msg, reply_cls=None, reply_multi=False,
|
||||||
|
|
Loading…
Reference in New Issue