Eric Blake
2021-Aug-03 19:20 UTC
[Libguestfs] [PATCH virt-v2v] v2v: -o rhv-upload: Enable multi-conn
On Mon, Aug 02, 2021 at 08:41:20AM +0100, Richard W.M. Jones wrote:> --- > v2v/rhv-upload-plugin.py | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > index a3d578176..51e9b33f7 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -169,6 +169,10 @@ def open(readonly): > } > > > +def can_multi_conn(h): > + return TrueShould this be h['can_flush'] instead of True? Are we guaranteed that imageio guarantees a consistent image across all other http connections when a flush is received on a single http connection? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Richard W.M. Jones
2021-Aug-03 19:31 UTC
[Libguestfs] [PATCH virt-v2v] v2v: -o rhv-upload: Enable multi-conn
On Tue, Aug 03, 2021 at 02:20:01PM -0500, Eric Blake wrote:> On Mon, Aug 02, 2021 at 08:41:20AM +0100, Richard W.M. Jones wrote: > > --- > > v2v/rhv-upload-plugin.py | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > > index a3d578176..51e9b33f7 100644 > > --- a/v2v/rhv-upload-plugin.py > > +++ b/v2v/rhv-upload-plugin.py > > @@ -169,6 +169,10 @@ def open(readonly): > > } > > > > > > +def can_multi_conn(h): > > + return True > > Should this be h['can_flush'] instead of True?In the later version this is different(-ly bad): https://listman.redhat.com/archives/libguestfs/2021-August/msg00022.html> Are we guaranteed that imageio guarantees a consistent image across > all other http connections when a flush is received on a single http > connection?That's a question for Nir (CC'd). However it's likely true anyway since even in the the current implementation it flushes all HTTP connections inside the nbdkit plugin: https://github.com/libguestfs/virt-v2v/blob/0d6d15ebdcad4a4df54f397cbc1b46fcdaf3f16a/v2v/rhv-upload-plugin.py#L342 and I didn't change this behaviour in the proposed patches. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Nir Soffer
2021-Aug-03 19:36 UTC
[Libguestfs] [PATCH virt-v2v] v2v: -o rhv-upload: Enable multi-conn
On Tue, Aug 3, 2021 at 10:26 PM Eric Blake <eblake at redhat.com> wrote:> > On Mon, Aug 02, 2021 at 08:41:20AM +0100, Richard W.M. Jones wrote: > > --- > > v2v/rhv-upload-plugin.py | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > > index a3d578176..51e9b33f7 100644 > > --- a/v2v/rhv-upload-plugin.py > > +++ b/v2v/rhv-upload-plugin.py > > @@ -169,6 +169,10 @@ def open(readonly): > > } > > > > > > +def can_multi_conn(h): > > + return True > > Should this be h['can_flush'] instead of True? > > Are we guaranteed that imageio guarantees a consistent image across > all other http connections when a flush is received on a single http > connection?imageio keeps multiple connections to qemu-nbd, and pass all requests to qemu-nbd. No caching is done in imageio. But we don't do any synchronization, so we may have one flush command in the middle of a write/write_zeros commands. Does qemu-nbd wait until the write/wirte_zeros commands complete before flushing?