Update cAdvisor.
Also update golang.org/x/sys because of google/cadvisor#1786
This commit is contained in:
12
vendor/github.com/google/cadvisor/container/common/fsHandler.go
generated
vendored
12
vendor/github.com/google/cadvisor/container/common/fsHandler.go
generated
vendored
@@ -51,7 +51,6 @@ type realFsHandler struct {
|
||||
}
|
||||
|
||||
const (
|
||||
longOp = time.Second
|
||||
timeout = 2 * time.Minute
|
||||
maxBackoffFactor = 20
|
||||
)
|
||||
@@ -93,10 +92,10 @@ func (fh *realFsHandler) update() error {
|
||||
fh.Lock()
|
||||
defer fh.Unlock()
|
||||
fh.lastUpdate = time.Now()
|
||||
if rootDiskErr == nil && fh.rootfs != "" {
|
||||
if rootInodeErr == nil && fh.rootfs != "" {
|
||||
fh.usage.InodeUsage = inodeUsage
|
||||
}
|
||||
if rootInodeErr == nil && fh.rootfs != "" {
|
||||
if rootDiskErr == nil && fh.rootfs != "" {
|
||||
fh.usage.TotalUsageBytes = baseUsage + extraDirUsage
|
||||
}
|
||||
if extraDiskErr == nil && fh.extraDir != "" {
|
||||
@@ -111,6 +110,7 @@ func (fh *realFsHandler) update() error {
|
||||
|
||||
func (fh *realFsHandler) trackUsage() {
|
||||
fh.update()
|
||||
longOp := time.Second
|
||||
for {
|
||||
select {
|
||||
case <-fh.stopChan:
|
||||
@@ -128,7 +128,11 @@ func (fh *realFsHandler) trackUsage() {
|
||||
}
|
||||
duration := time.Since(start)
|
||||
if duration > longOp {
|
||||
glog.V(2).Infof("du and find on following dirs took %v: %v", duration, []string{fh.rootfs, fh.extraDir})
|
||||
// adapt longOp time so that message doesn't continue to print
|
||||
// if the long duration is persistent either because of slow
|
||||
// disk or lots of containers.
|
||||
longOp = longOp + time.Second
|
||||
glog.V(2).Infof("du and find on following dirs took %v: %v; will not log again for this container unless duration exceeds %v", duration, []string{fh.rootfs, fh.extraDir}, longOp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user