mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Ignore not found erros in Paths
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
@@ -155,13 +155,21 @@ func (raw *data) parent(subsystem string) (string, error) {
|
||||
|
||||
func (raw *data) Paths() (map[string]string, error) {
|
||||
paths := make(map[string]string)
|
||||
|
||||
for sysname := range subsystems {
|
||||
path, err := raw.path(sysname)
|
||||
if err != nil {
|
||||
// Don't fail if a cgroup hierarchy was not found, just skip this subsystem
|
||||
if cgroups.IsNotFound(err) {
|
||||
continue
|
||||
}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paths[sysname] = path
|
||||
}
|
||||
|
||||
return paths, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user