Skip to content

Commit 83eb30f

Browse files
committed
test
1 parent 7ba762c commit 83eb30f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

metric/system/cgroup/reader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ func (r *Reader) readControllerList(cgroupsFile string) ([]string, error) {
387387
return nil, fmt.Errorf("error reading cgroup '%s': file %s: %w", cgpath, cgFilePath, err)
388388
}
389389

390+
logp.L().Infof("controllersRaw: %s", controllersRaw)
390391
if len(controllersRaw) == 0 {
391392
return []string{}, nil
392393
}

metric/system/cgroup/util.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ func isCgroupNSPrivate() bool {
304304
}
305305
// if we have a path of just "/" that means we're in our own private namespace
306306
// if it's something else, we're probably in a host namespace
307+
logp.L().Infof("isCgroupPathSlash(%s) = %v", string(raw), isCgroupPathSlash(raw))
307308
return isCgroupPathSlash(raw)
308309
}
309310

@@ -482,6 +483,7 @@ func (r *Reader) ProcessCgroupPaths(pid int) (PathList, error) {
482483
if r.cgroupsHierarchyOverride != "" {
483484
path = r.cgroupsHierarchyOverride
484485
}
486+
path = filepath.Join(path)
485487

486488
//on newer docker versions (1.41+?), docker will do namespacing with cgroups
487489
// such that we'll get a cgroup path like `0::/../../user.slice/user-1000.slice/session-520.scope`

0 commit comments

Comments
 (0)