[lxc-devel] [lxd/master] lxd/projects: Fix clustered exec/console

stgraber on Github lxc-bot at linuxcontainers.org
Wed Oct 24 17:09:06 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/20181024/8f0e4e97/attachment.bin>
-------------- next part --------------
From 055a41f71630f893017d910c04f20143cdb1bf23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 24 Oct 2018 11:08:12 -0600
Subject: [PATCH] lxd/projects: Fix clustered exec/console
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_console.go | 2 +-
 lxd/container_exec.go    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/container_console.go b/lxd/container_console.go
index f5270af7e2..b12f060fe5 100644
--- a/lxd/container_console.go
+++ b/lxd/container_console.go
@@ -275,7 +275,7 @@ func containerConsolePost(d *Daemon, r *http.Request) Response {
 	}
 
 	if client != nil {
-		url := fmt.Sprintf("/containers/%s/console", name)
+		url := fmt.Sprintf("/containers/%s/console?project=%s", name, project)
 		op, _, err := client.RawOperation("POST", url, post, "")
 		if err != nil {
 			return SmartError(err)
diff --git a/lxd/container_exec.go b/lxd/container_exec.go
index 2a1d5049e0..1d0bfeec20 100644
--- a/lxd/container_exec.go
+++ b/lxd/container_exec.go
@@ -353,7 +353,7 @@ func containerExecPost(d *Daemon, r *http.Request) Response {
 	}
 
 	if client != nil {
-		url := fmt.Sprintf("/containers/%s/exec", name)
+		url := fmt.Sprintf("/containers/%s/exec?project=%s", name, project)
 		op, _, err := client.RawOperation("POST", url, post, "")
 		if err != nil {
 			return SmartError(err)


More information about the lxc-devel mailing list