From 613c42b89b3a007e31a2f79eee5a9aeb17561056 Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Wed, 10 May 2017 16:32:00 -0700 Subject: [PATCH] Make a log line more clear in kuberuntime_manager.go. --- pkg/kubelet/kuberuntime/kuberuntime_manager.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index a09909e8c04..0e2abdb2bfc 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -380,7 +380,11 @@ func (m *kubeGenericRuntimeManager) podSandboxChanged(pod *v1.Pod, podStatus *ku // Needs to create a new sandbox when readySandboxCount > 1 or the ready sandbox is not the latest one. sandboxStatus := podStatus.SandboxStatuses[0] - if readySandboxCount > 1 || sandboxStatus.State != runtimeapi.PodSandboxState_SANDBOX_READY { + if readySandboxCount > 1 { + glog.V(2).Infof("More than 1 sandboxes for pod %q are ready. Need to reconcile them", format.Pod(pod)) + return true, sandboxStatus.Metadata.Attempt + 1, sandboxStatus.Id + } + if sandboxStatus.State != runtimeapi.PodSandboxState_SANDBOX_READY { glog.V(2).Infof("No ready sandbox for pod %q can be found. Need to start a new one", format.Pod(pod)) return true, sandboxStatus.Metadata.Attempt + 1, sandboxStatus.Id }