diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 80c24ca377..296886a253 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2002,188 +2002,188 @@ }, { "ImportPath": "github.com/google/cadvisor/accelerators", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/client/v2", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/collector", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/common", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/containerd", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/crio", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/docker", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/libcontainer", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/mesos", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/raw", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/rkt", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/container/systemd", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/devicemapper", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/events", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/fs", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/info/v1", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/info/v2", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/machine", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/manager", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/raw", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/rkt", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/metrics", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/storage", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/summary", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/cloudinfo", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/docker", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/oomparser", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/sysfs", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/utils/sysinfo", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/version", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/cadvisor/zfs", - "Comment": "v0.33.0", - "Rev": "511ec9ef821b334c3825cebb728208578c2300e8" + "Comment": "v0.33.1", + "Rev": "7e9ea00b05397d43b6539d22ea6ea51bf70fea83" }, { "ImportPath": "github.com/google/certificate-transparency-go", diff --git a/vendor/github.com/google/cadvisor/container/raw/handler.go b/vendor/github.com/google/cadvisor/container/raw/handler.go index c00e82d46b..2912e8948a 100644 --- a/vendor/github.com/google/cadvisor/container/raw/handler.go +++ b/vendor/github.com/google/cadvisor/container/raw/handler.go @@ -188,16 +188,15 @@ func fsToFsStats(fs *fs.Fs) info.FsStats { func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error { var filesystems []fs.Fs - - if self.includedMetrics.Has(container.DiskUsageMetrics) || self.includedMetrics.Has(container.DiskIOMetrics) { - var err error - // Get Filesystem information only for the root cgroup. - if isRootCgroup(self.name) { - filesystems, err = self.fsInfo.GetGlobalFsInfo() - if err != nil { - return err - } - } else if len(self.externalMounts) > 0 { + var err error + // Get Filesystem information only for the root cgroup. + if isRootCgroup(self.name) { + filesystems, err = self.fsInfo.GetGlobalFsInfo() + if err != nil { + return err + } + } else if self.includedMetrics.Has(container.DiskUsageMetrics) || self.includedMetrics.Has(container.DiskIOMetrics) { + if len(self.externalMounts) > 0 { var mountSet map[string]struct{} mountSet = make(map[string]struct{}) 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 { fs := filesystems[i] 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) }