1
0
mirror of https://github.com/opencontainers/runc.git synced 2025-07-30 17:43:06 +03:00

cgroup2: implement runc ps

Implemented `runc ps` for cgroup v2 , using a newly added method `m.GetUnifiedPath()`.
Unlike the v1  implementation that checks `m.GetPaths()["devices"]`, the v2 implementation does not require the device controller to be available.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2019-10-19 01:40:46 +09:00
parent f017e0f9e1
commit dbd771e475
6 changed files with 76 additions and 3 deletions

View File

@ -54,6 +54,10 @@ func (m *mockCgroupManager) GetPaths() map[string]string {
return m.paths
}
func (m *mockCgroupManager) GetUnifiedPath() (string, error) {
return "", fmt.Errorf("unimplemented")
}
func (m *mockCgroupManager) Freeze(state configs.FreezerState) error {
return nil
}