Skip to content

Commit a7cde7a

Browse files
committed
Increasing required verbosity level
1 parent 98f099f commit a7cde7a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

container/raw/factory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131

3232
var (
3333
DockerOnly = flag.Bool("docker_only", false, "Only report docker containers in addition to root stats")
34-
DisableRootCgroupStats = flag.Bool("disable_root_cgroup_stats", false, "Disable collecting root Cgroup stats")
34+
disableRootCgroupStats = flag.Bool("disable_root_cgroup_stats", false, "Disable collecting root Cgroup stats")
3535
)
3636

3737
type rawFactory struct {

container/raw/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func (h *rawContainerHandler) getFsStats(stats *info.ContainerStats) error {
227227
}
228228

229229
func (h *rawContainerHandler) GetStats() (*info.ContainerStats, error) {
230-
if *DisableRootCgroupStats && isRootCgroup(h.name) {
230+
if *disableRootCgroupStats && isRootCgroup(h.name) {
231231
return nil, nil
232232
}
233233
stats, err := h.libcontainerHandler.GetStats()

manager/container.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"github.com/google/cadvisor/cache/memory"
3434
"github.com/google/cadvisor/collector"
3535
"github.com/google/cadvisor/container"
36-
"github.com/google/cadvisor/container/raw"
3736
info "github.com/google/cadvisor/info/v1"
3837
v2 "github.com/google/cadvisor/info/v2"
3938
"github.com/google/cadvisor/stats"
@@ -482,8 +481,8 @@ func (cd *containerData) nextHousekeepingInterval() time.Duration {
482481
var empty time.Time
483482
stats, err := cd.memoryCache.RecentStats(cd.info.Name, empty, empty, 2)
484483
if err != nil {
485-
if cd.allowErrorLogging() && !(cd.isRoot() && *raw.DisableRootCgroupStats) {
486-
klog.Warningf("Failed to get RecentStats(%q) while determining the next housekeeping: %v", cd.info.Name, err)
484+
if cd.allowErrorLogging() {
485+
klog.V(4).Infof("Failed to get RecentStats(%q) while determining the next housekeeping: %v", cd.info.Name, err)
487486
}
488487
} else if len(stats) == 2 {
489488
// TODO(vishnuk): Use no processes as a signal.

0 commit comments

Comments
 (0)