Locally I find 5 seconds to be inadequate to reliably obtain the ip address of a container. This commit only adds an option, a subsequent commit could increase the default (5) if that seems reasonable.
Signed-off-by: John McFarlane <j...@rockfloat.com> --- src/lxc/lxc-start-ephemeral.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in index cb1f732..6123259 100644 --- a/src/lxc/lxc-start-ephemeral.in +++ b/src/lxc/lxc-start-ephemeral.in @@ -97,6 +97,9 @@ parser.add_argument("--union-type", "-U", type=str, default="overlayfs", parser.add_argument("--keep-data", "-k", action="store_true", help=_("don't wipe everything clean at the end")) +parser.add_argument("--get-ips-timeout", "-I", type=int, default=5, + help=_("the timeout to use when polling get_ips")) + parser.add_argument("command", metavar='CMD', type=str, nargs="*", help=_("Run specific command in container " "(command as argument)")) @@ -273,7 +276,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=args.get_ips_timeout) # Deal with the case where we just print info about the container if args.daemon: -- 1.8.1.2 ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel