[libvirt] [PATCH 1/2] Check if qemu-bridge-helper exists and is executable

Martin Kletzander mkletzan at redhat.com
Thu Aug 13 13:59:53 UTC 2015


On Thu, Aug 13, 2015 at 02:42:44PM +0200, Guido Günther wrote:
>Otherwise the error is just
>
>    error: Failed to create domain from test1.xml
>    error: failed to retrieve file descriptor for interface: Transport endpoint is not connected
>
>since we don't get a sensible error after the fork.
>---
> src/qemu/qemu_command.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>index 5a92ad4..bddc955 100644
>--- a/src/qemu/qemu_command.c
>+++ b/src/qemu/qemu_command.c
>@@ -295,6 +295,12 @@ static int qemuCreateInBridgePortWithHelper(virQEMUDriverConfigPtr cfg,
>         return -1;
>     }
>
>+    if (!virFileIsExecutable(cfg->bridgeHelperName)) {
>+        virReportSystemError(errno, _("'%s' not a suitable bridge helper"),

I think you meant s/ not/is not/

ACK to both with that fixed.

>+                             cfg->bridgeHelperName);
>+        return -1;
>+    }
>+
>     cmd = virCommandNew(cfg->bridgeHelperName);
>     if (flags & VIR_NETDEV_TAP_CREATE_VNET_HDR)
>         virCommandAddArgFormat(cmd, "--use-vnet");
>--
>2.1.4
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150813/581375bd/attachment-0001.sig>


More information about the libvir-list mailing list