Merge "Increase ovsdb_monitor.SimpleInterfaceMonitor start timeout"

This commit is contained in:
Jenkins 2014-08-29 13:46:55 +00:00 committed by Gerrit Code Review
commit 2ab25d31c2

View File

@ -69,6 +69,10 @@ class SimpleInterfaceMonitor(OvsdbMonitor):
respawn_interval=respawn_interval,
)
self.data_received = False
if respawn_interval:
self._default_timeout = respawn_interval / 2
else:
self._default_timeout = 10
@property
def is_active(self):
@ -87,7 +91,8 @@ class SimpleInterfaceMonitor(OvsdbMonitor):
"""
return bool(list(self.iter_stdout())) or not self.is_active
def start(self, block=False, timeout=5):
def start(self, block=False, timeout=None):
timeout = timeout or self._default_timeout
super(SimpleInterfaceMonitor, self).start()
if block:
eventlet.timeout.Timeout(timeout)