Hide Forgot
Callers of the function nlComm expect it to generate a log message if it fails, but on three different error conditions it will instead returns an error, but not log anything. If virsh calls something that results in this (eg starting a guest with a "type='direct'" interface that fails to create the required macvtap interface), it will be forced to explain the situation as "unspecified error". A patch has already been pushed upstream to remedy this: commit 12775d9491f0d98de6eb4593be4cacfaff1c4e47 Author: Laine Stump <laine> Date: Tue Mar 15 16:22:25 2011 -0400 macvtap: log an error if on failure to connect to netlink socket
rebased patch sent to rhvirt-patches: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-March/msg00463.html
That's a bit difficult, because the new code is only executed when there is an error opening a macvtap device. "Fortunately", a current bug in libnl makes it possible (although not predictably) to get such an error - just modify a guest's domain interface config to specify the interface type as "direct", using the physical interface as its direct connection, start virt-manager running, then start/stop that guest several times using virsh. <interface type='direct'> <mac address='.....'/> <source dev='eth0' mode='bridge'/> </interface> Eventually the guest will fail to start. Prior to this fix, virsh would report "unspecified error". With the fix it will report something like "cannot allocate nlhandle for netlink" (or some other message related to netlink). Once the libnl bug is fixed, you will no longer have an easy way to verify this bug.
Verified this bug pass with libvirt-0.8.7-14.el6.x86_64 with linux guest 1. Modify a guest's domain interface, config to specify the interface type as "direct", using the physical interface as its direct connection <interface type='direct'> <mac address='.....'/> <source dev='eth0' mode='bridge'/> </interface> 2. Open virt-manager and connect to the hypervisor 3. # for i in `seq 1 100`; do virsh start rhel61_i386_11; virsh destroy rhel61_i386_11; done Domain rhel61_i386_11 started Domain rhel61_i386_11 destroyed error: Failed to start domain rhel61_i386_11 error: cannot connect to netlink socket: Address already in use Reproduced this bug with older package libvirt-0.8.7-13.el6.x86_64 with linux guest 1. Modify a guest's domain interface, config to specify the interface type as "direct", using the physical interface as its direct connection <interface type='direct'> <mac address='.....'/> <source dev='eth0' mode='bridge'/> </interface> 2. Open virt-manager and connect to the hypervisor 3. # for i in `seq 1 1000`; do virsh start rhel61_i386_11; virsh destroy rhel61_i386_11; done Domain rhel61_i386_11 started Domain rhel61_i386_11 destroyed error: Failed to start domain rhel61_i386_11 error: Unknown failure
libnl-1.1-13.el6.x86_64 is used for the test in comment 6
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html