Unverified Commit 819554fe by John McFarlane Committed by Stéphane Graber

Make get_ips timeout poll configurable

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: 's avatarJohn McFarlane <john@rockfloat.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 52026772
...@@ -273,7 +273,7 @@ if not args.command and not args.daemon: ...@@ -273,7 +273,7 @@ if not args.command and not args.daemon:
sys.exit(0) sys.exit(0)
# Try to get the IP addresses # 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 # Deal with the case where we just print info about the container
if args.daemon: if args.daemon:
......
...@@ -369,6 +369,7 @@ class Container(_lxc.Container): ...@@ -369,6 +369,7 @@ class Container(_lxc.Container):
kwargs['scope'] = scope kwargs['scope'] = scope
ips = None ips = None
timeout = int(os.environ.get('LXC_GETIP_TIMEOUT', timeout))
while not ips: while not ips:
ips = _lxc.Container.get_ips(self, **kwargs) ips = _lxc.Container.get_ips(self, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment