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: abhi <abhi@docker.com>

cc @Random-Liu
This commit is contained in:
Kubernetes Submit Queue 2018-01-11 15:01:02 -08:00 committed by GitHub
commit ca311b3043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,14 +123,14 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
containerID := stats.Attributes.Id
container, found := containerMap[containerID]
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
}
podSandboxID := container.PodSandboxId
podSandbox, found := podSandboxMap[podSandboxID]
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
}
@ -142,7 +142,7 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
// Fill stats from cadvisor is available for full set of required pod stats
caPodSandbox, found := caInfos[podSandboxID]
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 {
p.addCadvisorPodStats(ps, &caPodSandbox)
}
@ -153,7 +153,7 @@ func (p *criStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
// container stats
caStats, caFound := caInfos[containerID]
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 {
p.addCadvisorContainerStats(cs, &caStats)
}