Skip to content

Commit 4f8ccc5

Browse files
committed
libct/cg/sd/v2: call initPath from Path
Sometimes Path() is called before m.path is initialized (in particular, this happens from (*linuxContainer).newInitConfig), so we do need to make sure to call initPath. This fixes the following integration tests (for cgroup v2 + systemd case, currently not enabled -- to be enabled by further commits): * runc run (blkio weight) * runc run (cgroupv2 mount inside container) Fixes: ff692f2 ("Fix cgroup2 mount for rootless case") Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent 0ed1f80 commit 4f8ccc5

File tree

1 file changed

+1
-0
lines changed
  • libcontainer/cgroups/systemd

1 file changed

+1
-0
lines changed

libcontainer/cgroups/systemd/v2.go

+1
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ func (m *unifiedManager) Destroy() error {
317317
}
318318

319319
func (m *unifiedManager) Path(_ string) string {
320+
_ = m.initPath()
320321
return m.path
321322
}
322323

0 commit comments

Comments
 (0)