[et-mgmt-tools] [PATCH] Default --wait to 120 minutes for Windows
Cole Robinson
crobinso at redhat.com
Fri Feb 6 18:50:48 UTC 2009
john.levon at sun.com wrote:
> # HG changeset patch
> # User john.levon at sun.com
> # Date 1233861322 28800
> # Node ID e72836e9f581e0761ba9ed3253397b1b51affc7e
> # Parent 7c38f808054c83211e428178baa4dda597815ba0
> Default --wait to 120 minutes for Windows
>
> If we're installing a Windows guest, it will reboot during the
> installation. Default to waiting in this case so virt-install is still
> around to manage the reboot.
>
> Signed-off-by: John Levon <john.levon at sun.com>
>
> diff --git a/virt-install b/virt-install
> --- a/virt-install
> +++ b/virt-install
> @@ -620,18 +620,26 @@ def main():
> else:
> return txt_console(dom, options.connect)
>
> - wait = False
> - wait_time = 0
> + # There are two main cases we care about:
> + #
> + # Scripts: these should specify --wait always, maintaining the
> + # semantics of virt-install exit implying the domain has finished
> + # installing.
> + #
> + # Interactive: If this is a continue_inst domain, we default to
> + # waiting. Otherwise, we can exit before the domain has finished
> + # installing. Passing --wait will give the above semantics.
> + #
> + wait = continue_inst
> + wait_time = 120 * 60
> +
Making this 'wait indefinitely' is fine by me.
> if options.wait:
> wait = True
> wait_time = options.wait * 60
>
> - if wait is True and wait_time == 0:
> - # wait == 0 implies noautoconsole
> - options.autoconsole = False
> -
> if options.autoconsole is False:
> conscb = None
> + wait = False
I don't think the above line is correct. 'wait 0' is supposed to be
equivalent to 'noautoconsole', but 'noautoconsole' shouldn't disable any
explicit wait value.
Though currently wait 0 still throws a console up (which is a bug: 'if
options.wait' should be 'if options.wait == None').
Aside from that, the patch looks good.
Thanks,
Cole
More information about the et-mgmt-tools
mailing list