mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 18:05:20 +00:00
Laine Stump
12775d9491
macvtap: log an error if on failure to connect to netlink socket
A bug in libnl (see https://bugzilla.redhat.com/show_bug.cgi?id=677724 and https://bugzilla.redhat.com/show_bug.cgi?id=677725) makes it very easy to create a failure to connect to the netlink socket when trying to open a macvtap network device ("type='direct'" in domain interface XML). When that error occurred (during a call to libnl's nl_connect() from libvirt's nlComm(), there was no log message, leading virsh (for example) to report "unknown error". There were two other cases in nlComm where an error in a libnl function might return with failure but no error reported. In all three cases, this patch logs a message which will hopefully be more useful. Note that more detailed information about the failure might be available from libnl's nl_geterror() function, but it calls strerror(), which is not threadsafe, so we can't use it.
LibVirt : simple API for virtualization Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. Daniel Veillard <veillard@redhat.com>
Description
Libvirt provides a portable, long term stable C API for managing the
virtualization technologies provided by many operating systems. It
includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware
vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER
Hypervisor.
Languages
C
94.8%
Python
2%
Meson
0.9%
Shell
0.8%
Dockerfile
0.6%
Other
0.8%