[lxc-devel] [lxd/master] include remote name in pretty printed error message

tych0 on Github lxc-bot at linuxcontainers.org
Mon Sep 19 15:58:54 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 572 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160919/eb4c81f2/attachment.bin>
-------------- next part --------------
From 238822d060b6533a1adbf99901e39dd2737344ed Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Mon, 19 Sep 2016 09:57:39 -0600
Subject: [PATCH] include remote name in pretty printed error message

output now looks like:

~/packages/go/src/github.com/lxc/lxd master lxc start kernel:foo2
error: Missing parent 'lxcbr0' for nic 'eth0'
Try `lxc info --show-log kernel:foo2` for more info

Closes #1843

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 lxc/launch.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxc/launch.go b/lxc/launch.go
index c180704..f68e2c6 100644
--- a/lxc/launch.go
+++ b/lxc/launch.go
@@ -129,7 +129,7 @@ func (c *launchCmd) run(config *lxd.Config, args []string) error {
 
 	err = d.WaitForSuccess(resp.Operation)
 	if err != nil {
-		return fmt.Errorf("%s\n"+i18n.G("Try `lxc info --show-log %s` for more info"), err, name)
+		return fmt.Errorf("%s\n"+i18n.G("Try `lxc info --show-log %s:%s` for more info"), err, remote, name)
 	}
 
 	return nil


More information about the lxc-devel mailing list