lower the time we wait for interfaces to appear

They might never appear.. for example when we have entries in
/etc/cloudstack/ips.json that haven't been plugged yet. Waiting
this long makes everything horribly slow (every vm, interface,
static route, etc, etc, will hit this wait, for every device).
This commit is contained in:
Remi Bergsma 2016-02-25 22:48:54 +01:00
parent ef115ab1d0
commit 3636ad1114
1 changed files with 1 additions and 2 deletions

View File

@ -235,8 +235,7 @@ class CsDevice:
continue
self.devlist.append(vals[0])
def waitfordevice(self, timeout=15):
""" Wait up to 15 seconds for a device to become available """
def waitfordevice(self, timeout=2):
count = 0
while count < timeout:
if self.dev in self.devlist: