Re: [PATCH] Add utility functions for storing uninstalled location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/24/2014 03:19 PM, Eric Blake wrote:
> 
> Note that the testsuite knows how to run uninstalled libvirt_iohelper
> when testing fdstream.c directly, but also note that virfile.c uses
> libvirt_iohelper but never uses its overridden location - our existing
> override is only half-baked.  And even though we have the override hook
> for iohelper, daemon/libvirt.c main() is not taking advantage of the
> hook - which means if you build libvirt.git on a system where libvirt is
> not installed, and try to use ./run to test your just-built binary, it
> will fail anywhere it tries to use libvirt_iohelper (because it will be
> trying to use the installed location, instead of the just-built in-tree
> location).  So I'm definitely in favor of this patch, but think it needs
> more patches in the series before it is ready to push.

I tried to actually reproduce this scenario in a VM (by attempting to
play with 'virsh pool' commands for creating a use of
libvirt_parthelper), but was foiled by hitting an even earlier failure.

In window 1 as root:
# yum uninstall -y libvirt\*
...
# ./run daemon/libvirtd

In window 2 as normal user:
$ ./run tools/virsh -c qemu:///system pool-list --all
error: failed to connect to the hypervisor
error: authentication failed: polkit: Error checking for authorization
org.libvirt.unix.manage:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action
org.libvirt.unix.manage is not registered

Logs in window 1:
2014-03-24 22:46:59.321+0000: 7615: info : libvirt version: 1.2.3
2014-03-24 22:46:59.321+0000: 7615: error : virCommandWait:2426 :
internal error: Child process (/usr/bin/firewall-cmd --direct
--passthrough ipv4 --table filter --delete OUTPUT --out-interface virbr0
--protocol udp --destination-port 68 --jump ACCEPT) unexpected exit
status 13
2014-03-24 22:47:06.341+0000: 7615: error : x86Decode:1573 : internal
error: Cannot find suitable CPU model for given data
2014-03-24 22:47:06.341+0000: 7615: warning : virQEMUCapsInit:918 :
Failed to get host CPU
2014-03-24 22:47:29.861+0000: 7599: warning :
remoteDispatchAuthPolkit:3210 : No support for caller UID with pkcheck.
This deployment is known to be insecure.
2014-03-24 22:47:30.204+0000: 7599: error :
remoteDispatchAuthPolkit:3229 : Policy kit denied action
org.libvirt.unix.manage from pid 7730, uid 1000 with status 127
2014-03-24 22:47:30.204+0000: 7599: error :
remoteDispatchAuthPolkit:3257 : authentication failed: polkit: Error
checking for authorization org.libvirt.unix.manage:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action
org.libvirt.unix.manage is not registered

2014-03-24 22:47:30.205+0000: 7566: error : virNetSocketReadWire:1456 :
End of file while reading data: Input/output error


And sure enough, installing libvirt-daemon-qemu then retrying the test
let things succeed, so we definitely have an up-front failure situation
where we are relying on installed files instead of ./run just working
from an uninstalled tree (it's just that most developers, including
myself, already have libvirtd installed, and normally don't run into
situations where a mismatch between the older libexec helper utilities
and the current libvirt development tree make a difference).

I might eventually spend some debug time trying to figure out why we
fail and how to work around it when running uninstalled (it may just be
a matter of missing .conf files in /etc causing different default
behavior), but it's not my current highest priority.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]