Commit 6dd5588e by Stéphane Graber

Improve veth error cases logging

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: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 3858c11b
...@@ -2945,7 +2945,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd ...@@ -2945,7 +2945,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
err = lxc_veth_create(veth1, veth2); err = lxc_veth_create(veth1, veth2);
if (err) { 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)); strerror(-err));
goto out_delete; goto out_delete;
} }
...@@ -2955,7 +2955,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd ...@@ -2955,7 +2955,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
* of a container */ * of a container */
err = setup_private_host_hw_addr(veth1); err = setup_private_host_hw_addr(veth1);
if (err) { 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)); veth1, strerror(-err));
goto out_delete; goto out_delete;
} }
...@@ -2965,7 +2965,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd ...@@ -2965,7 +2965,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
if (!err) if (!err)
err = lxc_netdev_set_mtu(veth2, atoi(netdev->mtu)); err = lxc_netdev_set_mtu(veth2, atoi(netdev->mtu));
if (err) { 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)); netdev->mtu, veth1, veth2, strerror(-err));
goto out_delete; goto out_delete;
} }
...@@ -2974,7 +2974,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd ...@@ -2974,7 +2974,7 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
if (netdev->link) { if (netdev->link) {
err = lxc_bridge_attach(netdev->link, veth1); err = lxc_bridge_attach(netdev->link, veth1);
if (err) { 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)); veth1, netdev->link, strerror(-err));
goto out_delete; goto out_delete;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment