The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8142
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From c16f6407d64b126ba97e8f3676476c29869bf5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Tue, 10 Nov 2020 22:26:14 -0500 Subject: [PATCH] lxd/cgroup: Fix swap limits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/cgroup/abstraction.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/cgroup/abstraction.go b/lxd/cgroup/abstraction.go index 4727021032..f78da3ab95 100644 --- a/lxd/cgroup/abstraction.go +++ b/lxd/cgroup/abstraction.go @@ -172,6 +172,10 @@ func (cg *CGroup) SetMemorySwapLimit(limit int64) error { case Unavailable: return ErrControllerMissing case V1: + if limit == -1 { + return cg.rw.Set(version, "memory", "memory.memsw.limit_in_bytes", "-1") + } + val, err := cg.rw.Get(version, "memory", "memory.limit_in_bytes") if err != nil { return err
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel