[lxc-devel] [lxd/master] Prefix the container name with the project name when invoking forkconsole

freeekanayaka on Github lxc-bot at linuxcontainers.org
Wed Oct 24 10:02:46 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 377 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181024/6271bfa7/attachment.bin>
-------------- next part --------------
From 292fb931e2cbcc24a79b44a3ca1e8717a815f8b0 Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanayaka at canonical.com>
Date: Wed, 24 Oct 2018 12:01:14 +0200
Subject: [PATCH] Prefix the container name with the project name when invoking
 forkconsole

Signed-off-by: Free Ekanayaka <free.ekanayaka at canonical.com>
---
 lxd/container_lxc.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index 1d13d0d85e..783e5ad5d3 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -5943,7 +5943,7 @@ func (c *containerLXC) Console(terminal *os.File) *exec.Cmd {
 	args := []string{
 		c.state.OS.ExecPath,
 		"forkconsole",
-		c.name,
+		projectPrefix(c.Project(), c.Name()),
 		c.state.OS.LxcPath,
 		filepath.Join(c.LogPath(), "lxc.conf"),
 		"tty=0",


More information about the lxc-devel mailing list