From ff4a15c7ef8059ad46ebcd798af2d64b96dc10e5 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 12 Sep 2017 10:55:38 -0400 Subject: [PATCH] UPSTREAM: 52344: Do not log spam image pull backoff --- .../pkg/kubelet/kuberuntime/kuberuntime_manager.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go index db389dd08a14..636f4b724caa 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -715,7 +715,14 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, _ v1.PodStatus, podStat glog.V(4).Infof("Creating container %+v in pod %v", container, format.Pod(pod)) if msg, err := m.startContainer(podSandboxID, podSandboxConfig, container, pod, podStatus, pullSecrets, podIP); err != nil { startContainerResult.Fail(err, msg) - utilruntime.HandleError(fmt.Errorf("container start failed: %v: %s", err, msg)) + // known errors that are logged in other places are logged at higher levels here to avoid + // repetitive log spam + switch { + case err == images.ErrImagePullBackOff: + glog.V(3).Infof("container start failed: %v: %s", err, msg) + default: + utilruntime.HandleError(fmt.Errorf("container start failed: %v: %s", err, msg)) + } continue } }