bump(google/cadvisor): v0.23.5

Fix an issue where cadvisor was unable to report container filesystem stats for LVM-based
devicemapper thin pools.

Fix an issue where cadvisor would not report any stats for a container if it failed to get the
filesystem stats when Docker's storage driver is devicemapper.
This commit is contained in:
Andy Goldstein
2016-06-22 17:04:54 -04:00
parent db43b68640
commit 98651fca01
3 changed files with 125 additions and 116 deletions

View File

@@ -16,6 +16,7 @@ package docker
import (
"fmt"
"os"
"strings"
dockertypes "github.com/docker/engine-api/types"
@@ -50,8 +51,19 @@ func DockerThinPoolName(info dockertypes.Info) (string, error) {
func DockerMetadataDevice(info dockertypes.Info) (string, error) {
metadataDevice := DriverStatusValue(info.DriverStatus, DriverStatusMetadataFile)
if len(metadataDevice) == 0 {
return "", fmt.Errorf("Could not get the devicemapper metadata device")
if len(metadataDevice) != 0 {
return metadataDevice, nil
}
poolName, err := DockerThinPoolName(info)
if err != nil {
return "", err
}
metadataDevice = fmt.Sprintf("/dev/mapper/%s_tmeta", poolName)
if _, err := os.Stat(metadataDevice); err != nil {
return "", err
}
return metadataDevice, nil