updated cadvisor version

This commit is contained in:
bindata-mockuser
2016-08-02 16:01:00 -07:00
parent fa5f3b816e
commit e00a35ccad
18 changed files with 211 additions and 161 deletions

View File

@@ -78,7 +78,7 @@ func New(port uint, runtime string) (Interface, error) {
}
// Create and start the cAdvisor container manager.
m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, maxHousekeepingInterval, allowDynamicHousekeeping, cadvisorMetrics.MetricSet{cadvisorMetrics.NetworkTcpUsageMetrics: struct{}{}})
m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, maxHousekeepingInterval, allowDynamicHousekeeping, cadvisorMetrics.MetricSet{cadvisorMetrics.NetworkTcpUsageMetrics: struct{}{}}, http.DefaultClient)
if err != nil {
return nil, err
}

View File

@@ -125,14 +125,14 @@ func (sb *summaryBuilder) build() (*stats.Summary, error) {
AvailableBytes: &sb.rootFsInfo.Available,
CapacityBytes: &sb.rootFsInfo.Capacity,
UsedBytes: &sb.rootFsInfo.Usage,
InodesFree: &sb.rootFsInfo.InodesFree},
InodesFree: sb.rootFsInfo.InodesFree},
StartTime: rootStats.StartTime,
Runtime: &stats.RuntimeStats{
ImageFs: &stats.FsStats{
AvailableBytes: &sb.imageFsInfo.Available,
CapacityBytes: &sb.imageFsInfo.Capacity,
UsedBytes: &sb.imageStats.TotalStorageBytes,
InodesFree: &sb.imageFsInfo.InodesFree,
InodesFree: sb.imageFsInfo.InodesFree,
},
},
}
@@ -164,14 +164,14 @@ func (sb *summaryBuilder) containerInfoV2FsStats(
cs.Logs = &stats.FsStats{
AvailableBytes: &sb.rootFsInfo.Available,
CapacityBytes: &sb.rootFsInfo.Capacity,
InodesFree: &sb.rootFsInfo.InodesFree,
InodesFree: sb.rootFsInfo.InodesFree,
}
// The container rootFs lives on the imageFs devices (which may not be the node root fs)
cs.Rootfs = &stats.FsStats{
AvailableBytes: &sb.imageFsInfo.Available,
CapacityBytes: &sb.imageFsInfo.Capacity,
InodesFree: &sb.imageFsInfo.InodesFree,
InodesFree: sb.imageFsInfo.InodesFree,
}
lcs, found := sb.latestContainerStats(info)
if !found {

View File

@@ -118,15 +118,17 @@ func TestBuildSummary(t *testing.T) {
"/pod2-c0": summaryTestContainerInfo(seedPod2Container, pName2, namespace2, cName20),
}
freeRootfsInodes := rootfsInodesFree
rootfs := v2.FsInfo{
Capacity: rootfsCapacity,
Available: rootfsAvailable,
InodesFree: rootfsInodesFree,
InodesFree: &freeRootfsInodes,
}
freeImagefsInodes := imagefsInodesFree
imagefs := v2.FsInfo{
Capacity: imagefsCapacity,
Available: imagefsAvailable,
InodesFree: imagefsInodesFree,
InodesFree: &freeImagefsInodes,
}
// memory limit overrides for each container (used to test available bytes if a memory limit is known)