Nir Soffer
2021-Jan-20 11:51 UTC
[Libguestfs] [PATCH] v2v: rhv-upload-plugin: Defer imageio connection
On Wed, Jan 20, 2021 at 12:30 PM Richard W.M. Jones <rjones at redhat.com> wrote:> > On Wed, Jan 20, 2021 at 01:44:47AM +0200, Nir Soffer wrote: > > I cannot test this change, since building virt-v2v on Fedora 32 fails. > > > > I tried: > > > > git clean -dxf > > ./autogen.sh > > make > > > > Make fails with: > > > > ... > > OCAMLCMI cmdline.cmi > > OCAMLOPT cmdline.cmx > > OCAMLCMI v2v.cmi > > OCAMLOPT v2v.cmx > > File "v2v.ml", line 94, characters 20-48: > > 94 | g#set_smp (min 8 (Sysconf.nr_processors_online ())); > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Error: Unbound module Sysconf > > Hint: Did you mean Scanf? > > I think this means the common/ submodule isn't updated, so you have > to do: > > git submodule updateRight, this was missing. Build was successful with: git clean -dxf git submodule update --init CFLAGS=-fPIC ./autogen.sh make Can we document this in the README? It may help to get more contribution to this project. Trying to test using this script: $ cat rhv-upload-test.sh #!/bin/sh virt-v2v \ -i disk /var/tmp/fedora-32.raw \ -o rhv-upload \ -oc https://engine-dev:8443/ovirt-engine/api \ -op password \ -on v2v \ -os storage-nfs-00 \ -of raw \ -oa sparse \ -oo rhv-cafile=ca.pem \ -oo rhv-cluster=ost-el8 \ -oo rhv-direct=false The next issue is nbdkit: $ ./run ./rhv-upload-test.sh nbdkit: error: cannot open plugin 'python': libpython3.7m.so.1.0: cannot open shared object file: No such file or directory $ ldd /usr/local/lib/nbdkit/plugins/nbdkit-python-plugin.so linux-vdso.so.1 (0x00007ffd50d53000) libpython3.7m.so.1.0 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9f43636000) libc.so.6 => /lib64/libc.so.6 (0x00007f9f4346c000) /lib64/ld-linux-x86-64.so.2 (0x00007f9f4368f000) Fedora 32 is using python 3.8. Looks like nbdkit package is broken. I'll try to build and install nbdkit from source. For simulating delay in block status, I think we can use something like: overlay.qcow2 -> nbdkit python And implement a fake extents handler sleeping 70 seconds and returning single data extent. This should be long enough to trigger this issue.
Richard W.M. Jones
2021-Jan-20 12:09 UTC
[Libguestfs] [PATCH] v2v: rhv-upload-plugin: Defer imageio connection
On Wed, Jan 20, 2021 at 01:51:39PM +0200, Nir Soffer wrote:> $ cat rhv-upload-test.sh > #!/bin/sh > > virt-v2v \ > -i disk /var/tmp/fedora-32.raw \ > -o rhv-upload \ > -oc https://engine-dev:8443/ovirt-engine/api \ > -op password \ > -on v2v \ > -os storage-nfs-00 \ > -of raw \ > -oa sparse \ > -oo rhv-cafile=ca.pem \ > -oo rhv-cluster=ost-el8 \ > -oo rhv-direct=false > > The next issue is nbdkit: > > $ ./run ./rhv-upload-test.sh > nbdkit: error: cannot open plugin 'python': libpython3.7m.so.1.0: > cannot open shared object file: No such file or directory > > $ ldd /usr/local/lib/nbdkit/plugins/nbdkit-python-plugin.so > linux-vdso.so.1 (0x00007ffd50d53000) > libpython3.7m.so.1.0 => not found > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9f43636000) > libc.so.6 => /lib64/libc.so.6 (0x00007f9f4346c000) > /lib64/ld-linux-x86-64.so.2 (0x00007f9f4368f000) > > Fedora 32 is using python 3.8. Looks like nbdkit package is broken. > > I'll try to build and install nbdkit from source.The nbdkit package in Fedora puts its plugins in /usr/lib64/nbdkit/plugins (not /usr/local) so it seems like you're using a self-compiled package already. It should work with the package in Fedora, so I would remove the self-compiled one and use the Fedora one.> For simulating delay in block status, I think we can use something like: > > overlay.qcow2 -> nbdkit python > > And implement a fake extents handler sleeping 70 seconds and returning > single data extent. This should be long enough to trigger this issue.Yup. RIch. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Richard W.M. Jones
2021-Jan-20 12:15 UTC
[Libguestfs] [PATCH] v2v: rhv-upload-plugin: Defer imageio connection
On Wed, Jan 20, 2021 at 01:51:39PM +0200, Nir Soffer wrote:> Right, this was missing. Build was successful with: > > git clean -dxf > git submodule update --init > CFLAGS=-fPIC ./autogen.sh > make > > Can we document this in the README? It may help to get more > contribution to this project.I documented it here: https://github.com/libguestfs/virt-v2v/commit/899d7849cb61ab225aefcbd31e81208a9b88ffd2 Note the -fPIC thing is a only needed on Fedora because of the way that Fedora requires us to compile OCaml. It's not needed on (eg) Debian. 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