Richard W.M. Jones
2018-Jun-05 18:19 UTC
[Libguestfs] [PATCH] v2v: -o rhv-upload: Set inactivity timeout (RHBZ#1586198).
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 also replaced the deprecated ‘image’ parameter with ‘disk’. 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, ) ) debug("transfer.id = %r" % transfer.id) -- 2.16.2
Nir Soffer
2018-Jun-07 13:58 UTC
Re: [Libguestfs] [PATCH] v2v: -o rhv-upload: Set inactivity timeout (RHBZ#1586198).
On Tue, Jun 5, 2018 at 9:19 PM Richard W.M. Jones <rjones@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/1563278I 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 > >
Richard W.M. Jones
2018-Jun-07 18:14 UTC
Re: [Libguestfs] [PATCH] v2v: -o rhv-upload: Set inactivity timeout (RHBZ#1586198).
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@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
Maybe Matching Threads
- Re: [PATCH] v2v: -o rhv-upload: Set inactivity timeout (RHBZ#1586198).
- [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
- v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
- Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
- v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).