@@ -41,7 +41,7 @@ func (cg *CgroupV1) GetBlockIOData(pid int, cgPath string) (*rspec.LinuxBlockIO,
41
41
if err != nil {
42
42
return nil , err
43
43
}
44
- if ! strings .Contains (subPath , RelCgroupPath ) {
44
+ if ! strings .Contains (subPath , cgPath ) {
45
45
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "blkio" )
46
46
}
47
47
filePath = filepath .Join (cg .MountPath , "blkio" , subPath , fileName )
@@ -203,7 +203,7 @@ func (cg *CgroupV1) GetCPUData(pid int, cgPath string) (*rspec.LinuxCPU, error)
203
203
if err != nil {
204
204
return nil , err
205
205
}
206
- if ! strings .Contains (subPath , RelCgroupPath ) {
206
+ if ! strings .Contains (subPath , cgPath ) {
207
207
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "cpu" )
208
208
}
209
209
filePath = filepath .Join (cg .MountPath , "cpu" , subPath , fileName )
@@ -266,7 +266,7 @@ func (cg *CgroupV1) GetCPUData(pid int, cgPath string) (*rspec.LinuxCPU, error)
266
266
if err != nil {
267
267
return nil , err
268
268
}
269
- if ! strings .Contains (subPath , RelCgroupPath ) {
269
+ if ! strings .Contains (subPath , cgPath ) {
270
270
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "cpuset" )
271
271
}
272
272
filePath = filepath .Join (cg .MountPath , "cpuset" , subPath , fileName )
@@ -362,7 +362,7 @@ func (cg *CgroupV1) GetHugepageLimitData(pid int, cgPath string) ([]rspec.LinuxH
362
362
if err != nil {
363
363
return lh , err
364
364
}
365
- if ! strings .Contains (subPath , RelCgroupPath ) {
365
+ if ! strings .Contains (subPath , cgPath ) {
366
366
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "hugetlb" )
367
367
}
368
368
filePath = filepath .Join (cg .MountPath , "hugetlb" , subPath , maxUsage )
@@ -396,7 +396,7 @@ func (cg *CgroupV1) GetMemoryData(pid int, cgPath string) (*rspec.LinuxMemory, e
396
396
if err != nil {
397
397
return nil , err
398
398
}
399
- if ! strings .Contains (subPath , RelCgroupPath ) {
399
+ if ! strings .Contains (subPath , cgPath ) {
400
400
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "memory" )
401
401
}
402
402
filePath = filepath .Join (cg .MountPath , "memory" , subPath , fileName )
@@ -476,7 +476,7 @@ func (cg *CgroupV1) GetNetworkData(pid int, cgPath string) (*rspec.LinuxNetwork,
476
476
if err != nil {
477
477
return nil , err
478
478
}
479
- if ! strings .Contains (subPath , RelCgroupPath ) {
479
+ if ! strings .Contains (subPath , cgPath ) {
480
480
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "net_cls" )
481
481
}
482
482
filePath = filepath .Join (cg .MountPath , "net_cls" , subPath , fileName )
@@ -499,7 +499,7 @@ func (cg *CgroupV1) GetNetworkData(pid int, cgPath string) (*rspec.LinuxNetwork,
499
499
if err != nil {
500
500
return nil , err
501
501
}
502
- if ! strings .Contains (subPath , RelCgroupPath ) {
502
+ if ! strings .Contains (subPath , cgPath ) {
503
503
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "net_prio" )
504
504
}
505
505
filePath = filepath .Join (cg .MountPath , "net_prio" , subPath , fileName )
@@ -534,7 +534,7 @@ func (cg *CgroupV1) GetPidsData(pid int, cgPath string) (*rspec.LinuxPids, error
534
534
if err != nil {
535
535
return nil , err
536
536
}
537
- if ! strings .Contains (subPath , RelCgroupPath ) {
537
+ if ! strings .Contains (subPath , cgPath ) {
538
538
return nil , fmt .Errorf ("cgroup subsystem %s is not mounted as expected" , "pids" )
539
539
}
540
540
filePath = filepath .Join (cg .MountPath , "pids" , subPath , fileName )
0 commit comments