[lxc-devel] [lxd/master] lxc/config: Fix metadata edit

stgraber on Github lxc-bot at linuxcontainers.org
Tue Jan 30 15:43:15 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180130/4f69c4d8/attachment.bin>
-------------- next part --------------
From a4ae2539454cf794dec5b2dbeef90fbbb339c333 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 30 Jan 2018 10:42:56 -0500
Subject: [PATCH] lxc/config: Fix metadata edit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxc/config.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lxc/config.go b/lxc/config.go
index 0c6d194ca..a955fdcb4 100644
--- a/lxc/config.go
+++ b/lxc/config.go
@@ -1321,9 +1321,10 @@ func (c *configCmd) doContainerMetadataEdit(client lxd.ContainerServer, name str
 	}
 
 	for {
+		metadata := api.ImageMetadata{}
 		err = yaml.Unmarshal(content, &metadata)
 		if err == nil {
-			err = client.SetContainerMetadata(name, *metadata, etag)
+			err = client.SetContainerMetadata(name, metadata, etag)
 		}
 
 		// Respawn the editor


More information about the lxc-devel mailing list