The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5535

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) ===
Closes #5493

Signed-off-by: Stéphane Graber <[email protected]>
From 50d0dff2131b921854884fa03f451b027d69e4fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]>
Date: Thu, 28 Feb 2019 11:35:58 +0100
Subject: [PATCH] lxd/profiles: Fix project update when clustered
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #5493

Signed-off-by: Stéphane Graber <[email protected]>
---
 lxd/profiles.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lxd/profiles.go b/lxd/profiles.go
index 126d19be37..3be0be4229 100644
--- a/lxd/profiles.go
+++ b/lxd/profiles.go
@@ -200,9 +200,9 @@ func profilePut(d *Daemon, r *http.Request) Response {
                if err != nil {
                        return BadRequest(err)
                }
+
                err = doProfileUpdateCluster(d, project, name, old)
                return SmartError(err)
-
        }
 
        var id int64
@@ -252,8 +252,9 @@ func profilePut(d *Daemon, r *http.Request) Response {
                if err != nil {
                        return SmartError(err)
                }
+
                err = notifier(func(client lxd.ContainerServer) error {
-                       return client.UpdateProfile(name, profile.ProfilePut, 
"")
+                       return client.UseProject(project).UpdateProfile(name, 
profile.ProfilePut, "")
                })
                if err != nil {
                        return SmartError(err)
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to