Re: [PATCH] Default --wait to 120 minutes for Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



john.levon@xxxxxxx wrote:
> # HG changeset patch
> # User john.levon@xxxxxxx
> # 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@xxxxxxx>
> 
> 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

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux