mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Merge pull request #100448 from saschagrunert/cri-stats-log
Do not error log CRI stats for not cached partitions
This commit is contained in:
commit
95bd8b95a7
@ -26,6 +26,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
cadvisormemory "github.com/google/cadvisor/cache/memory"
|
||||||
cadvisorfs "github.com/google/cadvisor/fs"
|
cadvisorfs "github.com/google/cadvisor/fs"
|
||||||
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
@ -442,7 +443,9 @@ func (p *criStatsProvider) getFsInfo(fsID *runtimeapi.FilesystemIdentifier) *cad
|
|||||||
fsInfo, err := p.cadvisor.GetDirFsInfo(mountpoint)
|
fsInfo, err := p.cadvisor.GetDirFsInfo(mountpoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := "Failed to get the info of the filesystem with mountpoint"
|
msg := "Failed to get the info of the filesystem with mountpoint"
|
||||||
if err == cadvisorfs.ErrNoSuchDevice {
|
if errors.Is(err, cadvisorfs.ErrNoSuchDevice) ||
|
||||||
|
errors.Is(err, cadvisorfs.ErrDeviceNotInPartitionsMap) ||
|
||||||
|
errors.Is(err, cadvisormemory.ErrDataNotFound) {
|
||||||
klog.V(2).InfoS(msg, "mountpoint", mountpoint, "err", err)
|
klog.V(2).InfoS(msg, "mountpoint", mountpoint, "err", err)
|
||||||
} else {
|
} else {
|
||||||
klog.ErrorS(err, msg, "mountpoint", mountpoint)
|
klog.ErrorS(err, msg, "mountpoint", mountpoint)
|
||||||
|
Loading…
Reference in New Issue
Block a user