From 2e2d6a7be9d62e9646c35d87119af3e767754edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 3 Dec 2014 11:01:45 -0500 Subject: [PATCH] Improve veth error cases logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous error message made it look like the host interface name was the concatenation of both the host and guest interface names. Closes #374 Signed-off-by: Stéphane Graber --- src/lxc/conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 90df4d256..b94bf1878 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2822,7 +2822,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd err = lxc_veth_create(veth1, veth2); if (err) { - ERROR("failed to create %s-%s : %s", veth1, veth2, + ERROR("failed to create veth pair (%s and %s): %s", veth1, veth2, strerror(-err)); goto out_delete; } @@ -2832,7 +2832,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd * of a container */ err = setup_private_host_hw_addr(veth1); if (err) { - ERROR("failed to change mac address of host interface '%s' : %s", + ERROR("failed to change mac address of host interface '%s': %s", veth1, strerror(-err)); goto out_delete; } @@ -2842,7 +2842,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd if (!err) err = lxc_netdev_set_mtu(veth2, atoi(netdev->mtu)); if (err) { - ERROR("failed to set mtu '%s' for %s-%s : %s", + ERROR("failed to set mtu '%s' for veth pair (%s and %s): %s", netdev->mtu, veth1, veth2, strerror(-err)); goto out_delete; } @@ -2851,7 +2851,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd if (netdev->link) { err = lxc_bridge_attach(netdev->link, veth1); if (err) { - ERROR("failed to attach '%s' to the bridge '%s' : %s", + ERROR("failed to attach '%s' to the bridge '%s': %s", veth1, netdev->link, strerror(-err)); goto out_delete; }