From 0787ea8073ebd311d1758f45be1179f41056aa6c Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Tue, 27 Apr 2021 15:30:52 +0800 Subject: [PATCH] cgroupsCreate: not set resources to c.config.Resources cgroupsCreate will just keep the CPU resources infomation but not the others. Set it to c.config.Resources will clean most of resources of the container. This commit remove it to handle the issue. Fixes: #1758 Signed-off-by: Hui Zhu --- src/runtime/virtcontainers/container.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/runtime/virtcontainers/container.go b/src/runtime/virtcontainers/container.go index dace7d7255..6e8e1ba90d 100644 --- a/src/runtime/virtcontainers/container.go +++ b/src/runtime/virtcontainers/container.go @@ -1415,8 +1415,6 @@ func (c *Container) cgroupsCreate() (err error) { return fmt.Errorf("Could not create cgroup for %v: %v", c.state.CgroupPath, err) } - c.config.Resources = resources - // Add shim into cgroup if c.process.Pid > 0 { if err := cgroup.Add(cgroups.Process{Pid: c.process.Pid}); err != nil {