cgutil: set reserved mems on init even if already exist

This commit is contained in:
Nick Ethier 2021-04-12 23:58:49 -04:00
parent b235091a51
commit 45aee28c03
1 changed files with 4 additions and 3 deletions

View File

@ -156,13 +156,14 @@ func (c *cpusetManager) Init() error {
if err != nil {
return err
}
if err := fscommon.WriteFile(filepath.Join(cgroupParentPath, ReservedCpusetCgroupName), "cpuset.mems", parentMems); err != nil {
return err
}
} else if !os.IsExist(err) {
return err
}
if err := fscommon.WriteFile(filepath.Join(cgroupParentPath, ReservedCpusetCgroupName), "cpuset.mems", parentMems); err != nil {
return err
}
c.doneCh = make(chan struct{})
c.signalCh = make(chan struct{})