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 <teawater@antfin.com>
This commit is contained in:
Hui Zhu 2021-04-27 15:30:52 +08:00 committed by Hui Zhu
parent 831224aa22
commit 0787ea8073

View File

@ -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 {