]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: improve error message on failed fd transfer
authorEric Blake <eblake@redhat.com>
Mon, 28 Mar 2011 21:14:15 +0000 (15:14 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 29 Mar 2011 13:12:29 +0000 (07:12 -0600)
First fallout of fd: migration - it looks like SELinux enforcing
_does_ require fd labeling (running uninstalled libvirtd from an
unconstrained shell had no problems, but once faked out by doing
 chcon `stat -c %C /usr/sbin/libvirtd` daemon/libvirtd
 run_init $PWD/daemon/libvirtd
to run it with the same context as an init script service, and with
SELinux enforcing, I got a rather confusing failure:
error: Failed to save domain fedora_12 to fed12.img
error: internal error unable to send TAP file handle: No file descriptor supplied via SCM_RIGHTS

This fixes the error message, then I need to figure out a subsequent
patch that does the fsetfilecon() necessary to keep things happy.
It also appears that libvirtd hangs on a failed fd transfer; I don't
know if that needs an independent fix.

* src/qemu/qemu_monitor_text.c (qemuMonitorTextSendFileHandle):
Improve message, since TAP is no longer only client.

src/qemu/qemu_monitor_text.c

index 75b299562e925e310312f77b4c48cee6301ab0b4..fc19f722110c34cac5c4e0b76ae5ca8783bd9bd9 100644 (file)
@@ -1679,8 +1679,8 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
 
     if (STRNEQ(reply, "")) {
         qemuReportError(VIR_ERR_INTERNAL_ERROR,
-                        _("unable to send TAP file handle: %s"),
-                        reply);
+                        _("unable to send file handle '%s': %s"),
+                        fdname, reply);
         goto cleanup;
     }