Dont fail on missing subsystem for systemd stats
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
This commit is contained in:
parent
50106c7490
commit
7e1cfc1f6a
|
@ -75,6 +75,7 @@ func GetStats(c *cgroups.Cgroup) (*cgroups.Stats, error) {
|
||||||
if err == cgroups.ErrNotFound {
|
if err == cgroups.ErrNotFound {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -422,6 +422,11 @@ func GetStats(c *cgroups.Cgroup) (*cgroups.Stats, error) {
|
||||||
for sysname, sys := range subsystems {
|
for sysname, sys := range subsystems {
|
||||||
subsystemPath, err := getSubsystemPath(c, sysname)
|
subsystemPath, err := getSubsystemPath(c, sysname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// Don't fail if a cgroup hierarchy was not found, just skip this subsystem
|
||||||
|
if err == cgroups.ErrNotFound {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue