# HG changeset patch
# User john.levon@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.
- 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
+
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
else:
conscb = show_console
@@ -678,7 +686,7 @@ def main():
((wait_time > 0)
and (_(" %d minutes") % (int(wait_time) / 60))
or "") +
- " for domain to shutdown.")
+ " for domain to complete installation.")
while True:
if domain_is_shutdown(dom):
print _("Domain has shutdown. Continuing.")
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
02-05-2009, 07:12 PM
"Daniel P. Berrange"
Default --wait to 120 minutes for Windows
On Thu, Feb 05, 2009 at 11:20:15AM -0800, john.levon@sun.com wrote:
> # HG changeset patch
> # User john.levon@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.
Shouldn't we even just wait forever in this case ? That's kind
of what the 'continue' flag was intended to mean IIRC.
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
02-05-2009, 08:46 PM
John Levon
Default --wait to 120 minutes for Windows
On Thu, Feb 05, 2009 at 08:12:58PM +0000, Daniel P. Berrange wrote:
> > 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.
>
> Shouldn't we even just wait forever in this case ? That's kind
> of what the 'continue' flag was intended to mean IIRC.
That'd be fine by me, Cole?
regards
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
02-06-2009, 05:50 PM
Cole Robinson
Default --wait to 120 minutes for Windows
john.levon@sun.com wrote:
> # HG changeset patch
> # User john.levon@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@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
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
02-06-2009, 05:57 PM
Cole Robinson
Default --wait to 120 minutes for Windows
Cole Robinson wrote:
> john.levon@sun.com wrote:
>> # HG changeset patch
>> # User john.levon@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@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.
>
Oops, I just accidentally applied a version with the indefinite wait,
but not the autoconsole change. If you agree with the above, I'll just
commit the fix for it.
Thanks,
Cole
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
02-09-2009, 12:37 PM
John Levon
Default --wait to 120 minutes for Windows
On Fri, Feb 06, 2009 at 01:50:48PM -0500, Cole Robinson wrote:
> > 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.
Yes, this bit is wrong, I'm not sure how it got into the patch to be
honest
thanks
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
02-09-2009, 01:39 PM
Cole Robinson
Default --wait to 120 minutes for Windows
John Levon wrote:
> On Fri, Feb 06, 2009 at 01:50:48PM -0500, Cole Robinson wrote:
>
>>> 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.
>
> Yes, this bit is wrong, I'm not sure how it got into the patch to be
> honest
>
Okay, fixed now.
Thanks,
Cole
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools