Skip to content

Commit c7ab392

Browse files
committed
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: 8a740d5 ("libcontainer: cgroups: don't Set in Apply") Signed-off-by: Andrei Vagin <[email protected]>
1 parent 5446518 commit c7ab392

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcontainer/container_linux.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,10 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error {
957957
return err
958958
}
959959

960+
if err := c.cgroupManager.Set(c.config); err != nil {
961+
return newSystemError(err)
962+
}
963+
960964
path := fmt.Sprintf("/proc/%d/cgroup", pid)
961965
cgroupsPaths, err := cgroups.ParseCgroupFile(path)
962966
if err != nil {

0 commit comments

Comments
 (0)