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

Re: [et-mgmt-tools] [PATCH] 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


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