mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 21:36:24 +00:00
Log at higher verbosity levels some common SyncPod errors
This commit is contained in:
parent
13b9c9afd3
commit
a5ac80cbce
@ -688,7 +688,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))
|
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 {
|
if msg, err := m.startContainer(podSandboxID, podSandboxConfig, container, pod, podStatus, pullSecrets, podIP); err != nil {
|
||||||
startContainerResult.Fail(err, msg)
|
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
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user