[lxc-devel] [lxd/master] Bugfixes

stgraber on Github lxc-bot at linuxcontainers.org
Thu Jun 30 17:31:07 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/20160630/e315fe14/attachment.bin>
-------------- next part --------------
From c7d50e57f8acfd01bf244302ea9341f16d62de31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 28 Jun 2016 14:25:34 -0400
Subject: [PATCH 1/3] Makefile: Also have "make dist" run multiple go get
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>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 85a23e2..487f512 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,8 @@ dist:
 	rm -Rf lxd-$(VERSION) $(ARCHIVE) $(ARCHIVE).gz
 	mkdir -p lxd-$(VERSION)/dist
 	-GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
+	-GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
+	-GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
 	GOPATH=$(shell pwd)/lxd-$(VERSION)/dist go get -t -v -d ./...
 	rm -rf $(shell pwd)/lxd-$(VERSION)/dist/src/github.com/lxc/lxd
 	ln -s ../../../.. ./lxd-$(VERSION)/dist/src/github.com/lxc/lxd

From 222b28d51d25e30ebf9f5a86bdb4e8a50ca3b536 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 29 Jun 2016 17:15:57 -0400
Subject: [PATCH 2/3] Improve check for invalid physical devices
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

And drop the rather odd error message :)

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

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index c3f87a3..3ae3e94 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -3901,8 +3901,8 @@ func (c *containerLXC) insertNetworkDevice(name string, m shared.Device) error {
 		return nil
 	}
 
-	if m["hwaddr"] == "" || m["name"] == "" {
-		return fmt.Errorf("wtf? hwaddr=%s name=%s", m["hwaddr"], m["name"])
+	if m["parent"] != "" && !shared.PathExists(fmt.Sprintf("/sys/class/net/%s", m["parent"])) {
+		return fmt.Errorf("Parent device '%s' doesn't exist", m["parent"])
 	}
 
 	// Return empty list if not running

From 9ed562a1d122dd5d3b9439d788da007aba32eef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 30 Jun 2016 13:30:28 -0400
Subject: [PATCH 3/3] simplestreams: list images available as both squashfs and
 tar.xz
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>
---
 shared/simplestreams.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shared/simplestreams.go b/shared/simplestreams.go
index 3aa8f61..b1f4423 100644
--- a/shared/simplestreams.go
+++ b/shared/simplestreams.go
@@ -153,7 +153,7 @@ func (s *SimpleStreamsManifest) ToLXD() ([]ImageInfo, map[string][][]string) {
 				}
 			}
 
-			if found != 2 || size == 0 || filename == "" || fingerprint == "" {
+			if found < 2 || size == 0 || filename == "" || fingerprint == "" {
 				// Invalid image
 				continue
 			}


More information about the lxc-devel mailing list