The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6404
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) ===
From 4aaaed70e2e81b1d8dfbaabf4186a576ba9a9c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Tue, 5 Nov 2019 11:07:03 -0500 Subject: [PATCH 1/2] lxd/operations: Fix remote Wait MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #6394 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/operations.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxd/operations.go b/lxd/operations.go index d5a83fb4b3..780aa18fdc 100644 --- a/lxd/operations.go +++ b/lxd/operations.go @@ -361,12 +361,12 @@ func operationWaitGet(d *Daemon, r *http.Request) response.Response { return response.SmartError(err) } - _, body, err := client.GetOperationWait(id, timeout) + apiOp, _, err := client.GetOperationWait(id, timeout) if err != nil { return response.SmartError(err) } - return response.SyncResponse(true, body) + return response.SyncResponse(true, apiOp) } type operationWebSocket struct { From b7838e4c81eda1ecbaa23d9d24ee99061c1e832c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Tue, 5 Nov 2019 11:07:33 -0500 Subject: [PATCH 2/2] lxc/query: Fix handling of ?project= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxc/query.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lxc/query.go b/lxc/query.go index 88180c98ed..4cce83d90b 100644 --- a/lxc/query.go +++ b/lxc/query.go @@ -6,6 +6,7 @@ import ( "fmt" "io/ioutil" "net/http" + "net/url" "github.com/spf13/cobra" @@ -127,7 +128,12 @@ func (c *cmdQuery) Run(cmd *cobra.Command, args []string) error { } if c.flagRespWait && resp.Operation != "" { - resp, _, err = d.RawQuery("GET", fmt.Sprintf("%s/wait", resp.Operation), "", "") + uri, err := url.ParseRequestURI(resp.Operation) + if err != nil { + return err + } + + resp, _, err = d.RawQuery("GET", fmt.Sprintf("%s/wait?%s", uri.Path, uri.RawQuery), "", "") if err != nil { return err }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel