In data lunedì 13 marzo 2017 14:47:41 CET, Richard W.M. Jones ha scritto:
This has to be applied on top of this series:
https://www.redhat.com/archives/libguestfs/2017-March/msg00144.html
This is a fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=1430680
Kun Wei noticed that virt-v2v -i ova has a problem if we are running
as root and the OVA is not located on a path which is fully readable
by non-root. The reason for this is that libvirt runs qemu as a
non-root user in this case (because there is no qemu:///session for
root, which is a libvirt bug). qemu cannot access the path, and so
the conversion fails.
Now previously we'd seen this bug and worked around it by chmodding
the exploded directory, ie. the product of untarring the OVA file
(
https://bugzilla.redhat.com/show_bug.cgi?id=1375157#c6).
However this workaround stopped working when we added support for
accessing the OVA file directly instead of unpacking it, since now the
unreadable OVA file is the backing file.
Fixing this is simple enough -- at least in the trivial csae where the
OVA file is not in an unreadable containing directory, there's no good
way to work around that. But the fix revealed another bug in libvirt
to do with relative paths in backing files
(
https://bugzilla.redhat.com/show_bug.cgi?id=1431652) so I had to work
around that as well.
This series also includes a regression test for this. That's not
very simple either, since the regression test has to run as root,
requiring me to add infrastructure for running tests as root
('sudo make check-root').
Let's ACK this, although I still keep thinking this root workaround is
only going to hit us again and again (for example, in case the OVA is
in a root-only directory).
--
Pino Toscano