[Libguestfs] [PATCH] v2v: -o rhv-upload: Set inactivity timeout (RHBZ#1586198).

Nir Soffer nsoffer at redhat.com
Thu Jun 7 13:58:17 UTC 2018


On Tue, Jun 5, 2018 at 9:19 PM Richard W.M. Jones <rjones at redhat.com> wrote:

> This increases the inactivity timeout for transfers from the default
> (60 seconds) to 1 hour, so that we should never hit it for ordinary
> transfers.
>
> Note this requires oVirt >= 4.3.0 although the same change was
> backported to the 4.2 branch in later releases.  The corresponding
> oVirt fix was in https://bugzilla.redhat.com/1563278


I don't think this requires 4.3. RHV QE verified on 4.2.3.


> I also replaced the deprecated ‘image’ parameter with ‘disk’.
>

I assume that you don't care about backward compatibility,
and users will have to run latest version of oVirt/RHV to
use this?


>
> Thanks: Nir Soffer, Daniel Erez.
> ---
>  v2v/rhv-upload-plugin.py | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> index c3de7d555..44972de21 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -123,9 +123,8 @@ def open(readonly):
>      # Create a new image transfer.
>      transfer = transfers_service.add(
>          types.ImageTransfer(
> -            image = types.Image(
> -                id = disk.id
> -            )
> +            disk = types.Disk(id = disk.id),
> +            inactivity_timeout = 0,
>

Using 0 disables the timeout mechanism, did you mean 3600?


>          )
>      )
>      debug("transfer.id = %r" % transfer.id)
> --
> 2.16.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180607/ce99a33f/attachment.htm>


More information about the Libguestfs mailing list