mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: more verbose error when failing to create macvtap device
Investigation of a problem with creating passthrough macvtap devices (https://bugzilla.redhat.com/show_bug.cgi?id=1185501) has shown that this slightly more verbose failure message is useful. In particular, the mac address can be used to determine the domain. You could also figure this out by looking at preceding messages in a debug log, but this gets it in a single place.
This commit is contained in:
parent
451547a422
commit
72423df992
@ -107,6 +107,7 @@ virNetDevMacVLanCreate(const char *ifname,
|
|||||||
unsigned int recvbuflen;
|
unsigned int recvbuflen;
|
||||||
struct nl_msg *nl_msg;
|
struct nl_msg *nl_msg;
|
||||||
struct nlattr *linkinfo, *info_data;
|
struct nlattr *linkinfo, *info_data;
|
||||||
|
char macstr[VIR_MAC_STRING_BUFLEN];
|
||||||
|
|
||||||
if (virNetDevGetIndex(srcdev, &ifindex) < 0)
|
if (virNetDevGetIndex(srcdev, &ifindex) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -177,8 +178,9 @@ virNetDevMacVLanCreate(const char *ifname,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
virReportSystemError(-err->error,
|
virReportSystemError(-err->error,
|
||||||
_("error creating %s type of interface attach to %s"),
|
_("error creating %s interface %s@%s (%s)"),
|
||||||
type, srcdev);
|
type, ifname, srcdev,
|
||||||
|
virMacAddrFormat(macaddress, macstr));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user