[lxc-devel] [lxd/master] init: Fix btrfs subvolume creation

stgraber on Github lxc-bot at linuxcontainers.org
Tue Sep 19 21:53:59 UTC 2017


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/20170919/ea927989/attachment.bin>
-------------- next part --------------
From ce97914885f2fbc15868a524076f1ed4c45e5fa1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 19 Sep 2017 17:53:30 -0400
Subject: [PATCH] init: Fix btrfs subvolume creation
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/main_init.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/main_init.go b/lxd/main_init.go
index f2a1c3533..fb67a7064 100644
--- a/lxd/main_init.go
+++ b/lxd/main_init.go
@@ -689,6 +689,7 @@ func (cmd *CmdInit) askStorage(client lxd.ContainerServer, existingPools []strin
 	}
 
 	for {
+		storage.LoopSize = -1
 		storage.Pool = cmd.Context.AskString("Name of the new storage pool [default=default]: ", "default", nil)
 		if shared.StringInSlice(storage.Pool, existingPools) {
 			fmt.Printf("The requested storage pool \"%s\" already exists. Please choose another name.\n", storage.Pool)
@@ -726,7 +727,6 @@ func (cmd *CmdInit) askStorage(client lxd.ContainerServer, existingPools []strin
 			}
 		}
 
-		storage.LoopSize = -1
 		question := fmt.Sprintf("Create a new %s pool (yes/no) [default=yes]? ", strings.ToUpper(storage.Backend))
 		if cmd.Context.AskBool(question, "yes") {
 			if storage.Backend == "ceph" {


More information about the lxc-devel mailing list