From 57ef30a2ae432115f04678bc905b59451bddb5b8 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 7 Apr 2017 02:34:41 +0300 Subject: [PATCH] restore: apply resource limits When C/R was implemented, it was enough to call manager.Set to apply limits and to move a task. Now .Set() and .Apply() have to be called separately. Fixes: 8a740d5391a7 ("libcontainer: cgroups: don't Set in Apply") Signed-off-by: Andrei Vagin --- libcontainer/container_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index faecc468..3fca1c93 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -949,6 +949,10 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error { return err } + if err := c.cgroupManager.Set(c.config); err != nil { + return newSystemError(err) + } + path := fmt.Sprintf("/proc/%d/cgroup", pid) cgroupsPaths, err := cgroups.ParseCgroupFile(path) if err != nil {