Ignore not found erros in Paths
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
parent
3cdf12b041
commit
a117d3a1c0
|
@ -155,13 +155,21 @@ func (raw *data) parent(subsystem string) (string, error) {
|
||||||
|
|
||||||
func (raw *data) Paths() (map[string]string, error) {
|
func (raw *data) Paths() (map[string]string, error) {
|
||||||
paths := make(map[string]string)
|
paths := make(map[string]string)
|
||||||
|
|
||||||
for sysname := range subsystems {
|
for sysname := range subsystems {
|
||||||
path, err := raw.path(sysname)
|
path, err := raw.path(sysname)
|
||||||
if err != nil {
|
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
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
paths[sysname] = path
|
paths[sysname] = path
|
||||||
}
|
}
|
||||||
|
|
||||||
return paths, nil
|
return paths, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue