[lxc-devel] [lxd/master] Fix error message when snapshot with duplicate name

jsavikko on Github lxc-bot at linuxcontainers.org
Wed Mar 9 22:44:33 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 541 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160309/1b7734d8/attachment.bin>
-------------- next part --------------
From 42e86b7fff339b7a57c7f5d918e28d22c50fe286 Mon Sep 17 00:00:00 2001
From: Janne Savikko <janne.savikko at aalto.fi>
Date: Thu, 10 Mar 2016 00:31:18 +0200
Subject: [PATCH] Fix error message when snapshot with duplicate name

Signed-off-by: Janne Savikko <janne.savikko at aalto.fi>
---
 lxd/container.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/container.go b/lxd/container.go
index 6a14fd9..ef34401 100644
--- a/lxd/container.go
+++ b/lxd/container.go
@@ -594,7 +594,7 @@ func containerCreateInternal(d *Daemon, args containerArgs) (container, error) {
 
 	path := containerPath(args.Name, args.Ctype == cTypeSnapshot)
 	if shared.PathExists(path) {
-		return nil, fmt.Errorf("The container already exists")
+		return nil, fmt.Errorf("Snapshot '%s' already exists", args.Name)
 	}
 
 	// Wipe any existing log for this container name


More information about the lxc-devel mailing list