Unverified Commit ca311b30 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #57055 from abhi/logs

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fixing logs for cri stats **What this PR does / why we need it**: This is a follow up PR of https://github.com/kubernetes/kubernetes/pull/55810 to clean up couple of logs in cri stats code. Signed-off-by: 's avatarabhi <abhi@docker.com> cc @Random-Liu
parents 820ea04f 3dd6e98e
...@@ -123,14 +123,14 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) { ...@@ -123,14 +123,14 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
containerID := stats.Attributes.Id containerID := stats.Attributes.Id
container, found := containerMap[containerID] container, found := containerMap[containerID]
if !found { if !found {
glog.Errorf("Unknown id %q in container map.", containerID) glog.Errorf("Unable to find container id %q in container stats list", containerID)
continue continue
} }
podSandboxID := container.PodSandboxId podSandboxID := container.PodSandboxId
podSandbox, found := podSandboxMap[podSandboxID] podSandbox, found := podSandboxMap[podSandboxID]
if !found { if !found {
glog.Errorf("Unknown id %q in pod sandbox map.", podSandboxID) glog.Errorf("Unable to find pod sandbox id %q in pod stats list", podSandboxID)
continue continue
} }
...@@ -142,7 +142,7 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) { ...@@ -142,7 +142,7 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
// Fill stats from cadvisor is available for full set of required pod stats // Fill stats from cadvisor is available for full set of required pod stats
caPodSandbox, found := caInfos[podSandboxID] caPodSandbox, found := caInfos[podSandboxID]
if !found { if !found {
glog.V(4).Info("Unable to find cadvisor stats for sandbox %q", podSandboxID) glog.V(4).Infof("Unable to find cadvisor stats for sandbox %q", podSandboxID)
} else { } else {
p.addCadvisorPodStats(ps, &caPodSandbox) p.addCadvisorPodStats(ps, &caPodSandbox)
} }
...@@ -153,7 +153,7 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) { ...@@ -153,7 +153,7 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
// container stats // container stats
caStats, caFound := caInfos[containerID] caStats, caFound := caInfos[containerID]
if !caFound { if !caFound {
glog.V(4).Info("Unable to find cadvisor stats for %q", containerID) glog.V(4).Infof("Unable to find cadvisor stats for %q", containerID)
} else { } else {
p.addCadvisorContainerStats(cs, &caStats) p.addCadvisorContainerStats(cs, &caStats)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment