File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ type cgroupV2 struct {
78
78
}
79
79
80
80
func newCgroupV2 (mountpoint , group string , useSystemd bool ) (Cgroup , error ) {
81
- data , err := os .ReadFile (filepath .Join (mountpoint , "cgroup.controllers" ))
81
+ data , err := os .ReadFile (filepath .Join (mountpoint , controllersFile ))
82
82
if err != nil {
83
83
return nil , err
84
84
}
@@ -436,7 +436,7 @@ func (*cpu2) set(spec *specs.LinuxResources, path string) error {
436
436
}
437
437
438
438
v += " " + strconv .FormatUint (period , 10 )
439
- if err := setValue (path , "cpu.max" , v ); err != nil {
439
+ if err := setValue (path , cpuLimitCgroup , v ); err != nil {
440
440
return err
441
441
}
442
442
}
@@ -557,7 +557,7 @@ func (*memory2) set(spec *specs.LinuxResources, path string) error {
557
557
558
558
if spec .Memory .Limit != nil {
559
559
if val := numToStr (* spec .Memory .Limit ); val != "" {
560
- if err := setValue (path , "memory.max" , val ); err != nil {
560
+ if err := setValue (path , memoryLimitCgroup , val ); err != nil {
561
561
return err
562
562
}
563
563
}
You can’t perform that action at this time.
0 commit comments