]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Make get_ips timeout poll configurable
authorJohn McFarlane <john@rockfloat.com>
Fri, 12 Jul 2013 21:06:20 +0000 (14:06 -0700)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 16 Jul 2013 22:10:07 +0000 (18:10 -0400)
This commit increases the default timeout used by lxc-start-ephemeral
from 5 to 10, and adds support for an LXC_IP_TIMEOUT override.

Patchset 2:
  - Previous patch used a command line arg.

Signed-off-by: John McFarlane <john@rockfloat.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-start-ephemeral.in
src/python-lxc/lxc/__init__.py

index cb1f732c69bfc998c19eb2f9b6dc7250cadd679e..4cbf93fedf85ce988f61d3d06d3822c8187ff164 100644 (file)
@@ -273,7 +273,7 @@ if not args.command and not args.daemon:
     sys.exit(0)
 
 # Try to get the IP addresses
-ips = dest.get_ips(timeout=5)
+ips = dest.get_ips(timeout=10)
 
 # Deal with the case where we just print info about the container
 if args.daemon:
index 9ada7ffef94bbb6dbb601af8d431b30141d0e272..4891cd1dbc184bc684ca7dff8ece12362107544e 100644 (file)
@@ -369,6 +369,7 @@ class Container(_lxc.Container):
             kwargs['scope'] = scope
 
         ips = None
+        timeout = int(os.environ.get('LXC_GETIP_TIMEOUT', timeout))
 
         while not ips:
             ips = _lxc.Container.get_ips(self, **kwargs)