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:
16
vendor/github.com/google/cadvisor/utils/docker/docker.go
generated
vendored
16
vendor/github.com/google/cadvisor/utils/docker/docker.go
generated
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user