[lxc-devel] [lxd/master] Bugfixes

stgraber on Github lxc-bot at linuxcontainers.org
Sun Feb 21 05:50:29 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/20160221/5e83964f/attachment.bin>
-------------- next part --------------
From 68f86b9f741316c00f8aad8af562e7dfb226340b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 19 Feb 2016 20:25:02 -0500
Subject: [PATCH 1/2] tests: Keep pprof self-contained
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>
---
 test/suites/profiling.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/suites/profiling.sh b/test/suites/profiling.sh
index 9d1870d..519d5fe 100644
--- a/test/suites/profiling.sh
+++ b/test/suites/profiling.sh
@@ -7,6 +7,7 @@ test_cpu_profiling() {
   lxdpid=$(cat "${LXD3_DIR}/lxd.pid")
   kill -TERM "${lxdpid}"
   wait "${lxdpid}" || true
+  export PPROF_TMPDIR="${TEST_DIR}/pprof"
   echo top5 | go tool pprof "$(which lxd)" "${LXD3_DIR}/cpu.out"
   echo ""
 
@@ -32,6 +33,7 @@ test_mem_profiling() {
     timeout=$((timeout-1))
   done
 
+  export PPROF_TMPDIR="${TEST_DIR}/pprof"
   echo top5 | go tool pprof "$(which lxd)" "${LXD4_DIR}/mem"
   echo ""
 

From bf129258a95f7b47bc0d432665e17f792c8b4ee5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sun, 21 Feb 2016 00:42:40 -0500
Subject: [PATCH 2/2] Use iproute2 instead of bridge-utils
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/container_lxc.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index c8ca8c4..0701841 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -3100,7 +3100,7 @@ func (c *containerLXC) createNetworkDevice(name string, m shared.Device) (string
 		}
 
 		if m["nictype"] == "bridged" {
-			err = exec.Command("brctl", "addif", m["parent"], n1).Run()
+			err = exec.Command("ip", "link", "set", n1, "master", m["parent"]).Run()
 			if err != nil {
 				deviceRemoveInterface(n2)
 				return "", fmt.Errorf("Failed to add interface to bridge: %s", err)


More information about the lxc-devel mailing list