From 417fd6d53a34b2b48725cf5b1a84a5df28599453 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 20 May 2014 19:10:23 +0000 Subject: [PATCH] Fix network mode for lxc 1.0 Fixes #5692 This change requires lxc 1.0+ to work and breaks lxc versions less than 1.0 for host networking. We think that this is a find tradeoff by bumping docker to only support lxc 1.0 Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) Upstream-commit: 0f278940947d74f2b7889ada18808779312f9608 Component: engine --- components/engine/daemon/execdriver/lxc/lxc_template.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/engine/daemon/execdriver/lxc/lxc_template.go b/components/engine/daemon/execdriver/lxc/lxc_template.go index f2364cb77f..a16f8990e2 100644 --- a/components/engine/daemon/execdriver/lxc/lxc_template.go +++ b/components/engine/daemon/execdriver/lxc/lxc_template.go @@ -15,7 +15,9 @@ lxc.network.type = veth lxc.network.link = {{.Network.Interface.Bridge}} lxc.network.name = eth0 lxc.network.mtu = {{.Network.Mtu}} -{{else if not .Network.HostNetworking}} +{{else if .Network.HostNetworking}} +lxc.network.type = none +{{else}} # network is disabled (-n=false) lxc.network.type = empty lxc.network.flags = up