From 7b4f73ee6c2a06532124e77ec5f4972f078a7d5c Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Mon, 21 Sep 2015 21:16:42 +0200 Subject: [PATCH] daemon: execdriver: lxc: fix wrong template value passed to lxc conf Signed-off-by: Antonio Murdaca --- daemon/execdriver/lxc/lxc_template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/execdriver/lxc/lxc_template.go b/daemon/execdriver/lxc/lxc_template.go index 5589d9d9fd..f0096f7f08 100644 --- a/daemon/execdriver/lxc/lxc_template.go +++ b/daemon/execdriver/lxc/lxc_template.go @@ -96,8 +96,8 @@ lxc.cgroup.memory.soft_limit_in_bytes = {{.Resources.Memory}} lxc.cgroup.memory.memsw.limit_in_bytes = {{$memSwap}} {{end}} {{end}} -{{if .Resources.KernelMemory}} -lxc.cgroup.memory.kmem.limit_in_bytes = {{.Resources.Memory}} +{{if gt .Resources.KernelMemory 0}} +lxc.cgroup.memory.kmem.limit_in_bytes = {{.Resources.KernelMemory}} {{end}} {{if .Resources.CPUShares}} lxc.cgroup.cpu.shares = {{.Resources.CPUShares}}