Update cadvisor to v0.33.1.

This commit is contained in:
Lantao Liu 2019-03-07 11:57:27 -08:00
parent f8024ab087
commit 74f4579f07
2 changed files with 85 additions and 86 deletions

148
Godeps/Godeps.json generated
View File

@ -2002,188 +2002,188 @@
}, },
{ {
"ImportPath": "github.com/google/cadvisor/accelerators", "ImportPath": "github.com/google/cadvisor/accelerators",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/cache/memory", "ImportPath": "github.com/google/cadvisor/cache/memory",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/client/v2", "ImportPath": "github.com/google/cadvisor/client/v2",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/collector", "ImportPath": "github.com/google/cadvisor/collector",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container", "ImportPath": "github.com/google/cadvisor/container",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/common", "ImportPath": "github.com/google/cadvisor/container/common",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/containerd", "ImportPath": "github.com/google/cadvisor/container/containerd",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/crio", "ImportPath": "github.com/google/cadvisor/container/crio",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/docker", "ImportPath": "github.com/google/cadvisor/container/docker",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/libcontainer", "ImportPath": "github.com/google/cadvisor/container/libcontainer",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/mesos", "ImportPath": "github.com/google/cadvisor/container/mesos",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/raw", "ImportPath": "github.com/google/cadvisor/container/raw",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/rkt", "ImportPath": "github.com/google/cadvisor/container/rkt",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/container/systemd", "ImportPath": "github.com/google/cadvisor/container/systemd",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/devicemapper", "ImportPath": "github.com/google/cadvisor/devicemapper",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/events", "ImportPath": "github.com/google/cadvisor/events",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/fs", "ImportPath": "github.com/google/cadvisor/fs",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/info/v1", "ImportPath": "github.com/google/cadvisor/info/v1",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/info/v2", "ImportPath": "github.com/google/cadvisor/info/v2",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/machine", "ImportPath": "github.com/google/cadvisor/machine",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/manager", "ImportPath": "github.com/google/cadvisor/manager",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/manager/watcher", "ImportPath": "github.com/google/cadvisor/manager/watcher",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/manager/watcher/raw", "ImportPath": "github.com/google/cadvisor/manager/watcher/raw",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/manager/watcher/rkt", "ImportPath": "github.com/google/cadvisor/manager/watcher/rkt",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/metrics", "ImportPath": "github.com/google/cadvisor/metrics",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/storage", "ImportPath": "github.com/google/cadvisor/storage",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/summary", "ImportPath": "github.com/google/cadvisor/summary",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils", "ImportPath": "github.com/google/cadvisor/utils",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/cloudinfo", "ImportPath": "github.com/google/cadvisor/utils/cloudinfo",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/cpuload", "ImportPath": "github.com/google/cadvisor/utils/cpuload",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink", "ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/docker", "ImportPath": "github.com/google/cadvisor/utils/docker",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/oomparser", "ImportPath": "github.com/google/cadvisor/utils/oomparser",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/sysfs", "ImportPath": "github.com/google/cadvisor/utils/sysfs",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/utils/sysinfo", "ImportPath": "github.com/google/cadvisor/utils/sysinfo",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/version", "ImportPath": "github.com/google/cadvisor/version",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/cadvisor/zfs", "ImportPath": "github.com/google/cadvisor/zfs",
"Comment": "v0.33.0", "Comment": "v0.33.1",
"Rev": "511ec9ef821b334c3825cebb728208578c2300e8" "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83"
}, },
{ {
"ImportPath": "github.com/google/certificate-transparency-go", "ImportPath": "github.com/google/certificate-transparency-go",

View File

@ -188,8 +188,6 @@ func fsToFsStats(fs *fs.Fs) info.FsStats {
func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error { func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error {
var filesystems []fs.Fs var filesystems []fs.Fs
if self.includedMetrics.Has(container.DiskUsageMetrics) || self.includedMetrics.Has(container.DiskIOMetrics) {
var err error var err error
// Get Filesystem information only for the root cgroup. // Get Filesystem information only for the root cgroup.
if isRootCgroup(self.name) { if isRootCgroup(self.name) {
@ -197,7 +195,8 @@ func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error {
if err != nil { if err != nil {
return err return err
} }
} else if len(self.externalMounts) > 0 { } else if self.includedMetrics.Has(container.DiskUsageMetrics) || self.includedMetrics.Has(container.DiskIOMetrics) {
if len(self.externalMounts) > 0 {
var mountSet map[string]struct{} var mountSet map[string]struct{}
mountSet = make(map[string]struct{}) mountSet = make(map[string]struct{})
for _, mount := range self.externalMounts { for _, mount := range self.externalMounts {
@ -210,14 +209,14 @@ func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error {
} }
} }
if self.includedMetrics.Has(container.DiskUsageMetrics) { if isRootCgroup(self.name) || self.includedMetrics.Has(container.DiskUsageMetrics) {
for i := range filesystems { for i := range filesystems {
fs := filesystems[i] fs := filesystems[i]
stats.Filesystem = append(stats.Filesystem, fsToFsStats(&fs)) stats.Filesystem = append(stats.Filesystem, fsToFsStats(&fs))
} }
} }
if self.includedMetrics.Has(container.DiskIOMetrics) { if isRootCgroup(self.name) || self.includedMetrics.Has(container.DiskIOMetrics) {
common.AssignDeviceNamesToDiskStats(&fsNamer{fs: filesystems, factory: self.machineInfoFactory}, &stats.DiskIo) common.AssignDeviceNamesToDiskStats(&fsNamer{fs: filesystems, factory: self.machineInfoFactory}, &stats.DiskIo)
} }