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

Richard W.M. Jones rjones at redhat.com
Thu Jun 7 18:14:06 UTC 2018


On Thu, Jun 07, 2018 at 04:58:17PM +0300, Nir Soffer wrote:
> 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?

Bleah, yes I did ...

I actually also posted an earlier version of the patch than the
one I was testing (which had 3600).

I'll fix the commit message and push the right version, thanks.

Rich.

> 
> >          )
> >      )
> >      debug("transfer.id = %r" % transfer.id)
> > --
> > 2.16.2
> >
> >

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list