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 {
7878}
7979
8080func 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 ))
8282 if err != nil {
8383 return nil , err
8484 }
@@ -436,7 +436,7 @@ func (*cpu2) set(spec *specs.LinuxResources, path string) error {
436436 }
437437
438438 v += " " + strconv .FormatUint (period , 10 )
439- if err := setValue (path , "cpu.max" , v ); err != nil {
439+ if err := setValue (path , cpuLimitCgroup , v ); err != nil {
440440 return err
441441 }
442442 }
@@ -557,7 +557,7 @@ func (*memory2) set(spec *specs.LinuxResources, path string) error {
557557
558558 if spec .Memory .Limit != nil {
559559 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 {
561561 return err
562562 }
563563 }
You can’t perform that action at this time.
0 commit comments