[lxc-devel] [lxd/master] patches: make sure localdevices are updated

brauner on Github lxc-bot at linuxcontainers.org
Thu Jun 1 08:05:50 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 381 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170601/0a995bbe/attachment.bin>
-------------- next part --------------
From 98c7c9bad04e0d856b5fd78b721f0b64a76ee3bc Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Thu, 1 Jun 2017 10:00:01 +0200
Subject: [PATCH] patches: make sure localdevices are updated

Closes #3169.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 lxd/patches.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/patches.go b/lxd/patches.go
index e535da705..64bcc2fe3 100644
--- a/lxd/patches.go
+++ b/lxd/patches.go
@@ -1793,7 +1793,6 @@ func updatePoolPropertyForAllObjects(d *Daemon, poolName string, allcontainers [
 		k, _, _ = containerGetRootDiskDevice(localDevices)
 		if k != "" {
 			localDevices[k]["pool"] = poolName
-			args.Devices = localDevices
 		} else {
 			rootDev := map[string]string{}
 			rootDev["type"] = "disk"
@@ -1814,6 +1813,7 @@ func updatePoolPropertyForAllObjects(d *Daemon, poolName string, allcontainers [
 
 			localDevices[rootDevName] = rootDev
 		}
+		args.Devices = localDevices
 
 		err = c.Update(args, false)
 		if err != nil {


More information about the lxc-devel mailing list