[lxc-devel] [lxd/master] Another LXC 2.1 key rename, lxc.idmap

stgraber on Github lxc-bot at linuxcontainers.org
Tue Aug 22 03:50:33 UTC 2017


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/20170822/8d7f7091/attachment.bin>
-------------- next part --------------
From 9dc8d10e5248a822bcc8e2ae3caf64452ffbd52b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 21 Aug 2017 23:49:17 -0400
Subject: [PATCH] Another LXC 2.1 key rename, lxc.idmap
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>
---
 lxd/container_lxc.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index de32f1b28..07d972613 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -146,6 +146,8 @@ func lxcSetConfigItem(c *lxc.Container, key string, value string) error {
 			key = "lxc.init_uid"
 		case "lxc.init.gid":
 			key = "lxc.init_gid"
+		case "lxc.idmap":
+			key = "lxc.id_map"
 		}
 	}
 
@@ -1038,7 +1040,7 @@ func (c *containerLXC) initLXC() error {
 	if idmapset != nil {
 		lines := idmapset.ToLxcString()
 		for _, line := range lines {
-			err := lxcSetConfigItem(cc, "lxc.id_map", strings.TrimSuffix(line, "\n"))
+			err := lxcSetConfigItem(cc, "lxc.idmap", strings.TrimSuffix(line, "\n"))
 			if err != nil {
 				return err
 			}


More information about the lxc-devel mailing list