[lxc-devel] [lxd/master] Bugfixes

stgraber on Github lxc-bot at linuxcontainers.org
Wed May 25 15:40:55 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160525/62017434/attachment.bin>
-------------- next part --------------
From aeaf3fe536919c07c6a6dc21d9c7cc8dfaa61816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 24 May 2016 14:34:01 -0400
Subject: [PATCH 1/2] Add missing linebreak to lxd help
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.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/main.go b/lxd/main.go
index 27265b8..ba4841c 100644
--- a/lxd/main.go
+++ b/lxd/main.go
@@ -159,7 +159,7 @@ func run() error {
 		fmt.Printf("    callhook\n")
 		fmt.Printf("        Call a container hook\n")
 		fmt.Printf("    netcat\n")
-		fmt.Printf("        Mirror a unix socket to stdin/stdout")
+		fmt.Printf("        Mirror a unix socket to stdin/stdout\n")
 	}
 
 	// Parse the arguments

From c4995439bccc86ccd4f28283a27bdd8c0c0a4fb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 25 May 2016 11:35:31 -0400
Subject: [PATCH 2/2] zfs: Improve block device detection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When attempting to find the right block device for a zpool, only
consider actual block devices.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/devices.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lxd/devices.go b/lxd/devices.go
index 0c95dc8..529450d 100644
--- a/lxd/devices.go
+++ b/lxd/devices.go
@@ -723,11 +723,11 @@ func deviceGetParentBlocks(path string) ([]string, error) {
 						devices = append(devices, dev)
 					}
 				}
-			} else if shared.PathExists(fmt.Sprintf("/dev/%s", fields[0])) {
+			} else if deviceIsBlockdev(fmt.Sprintf("/dev/%s", fields[0])) {
 				path = fmt.Sprintf("/dev/%s", fields[0])
-			} else if shared.PathExists(fmt.Sprintf("/dev/disk/by-id/%s", fields[0])) {
+			} else if deviceIsBlockdev(fmt.Sprintf("/dev/disk/by-id/%s", fields[0])) {
 				path = fmt.Sprintf("/dev/disk/by-id/%s", fields[0])
-			} else if shared.PathExists(fmt.Sprintf("/dev/mapper/%s", fields[0])) {
+			} else if deviceIsBlockdev(fmt.Sprintf("/dev/mapper/%s", fields[0])) {
 				path = fmt.Sprintf("/dev/mapper/%s", fields[0])
 			} else {
 				continue


More information about the lxc-devel mailing list