Merge pull request #91469 from kinvolk/rata/fix-kubelet-log-msg

Fix kubelet log message when starting a container
This commit is contained in:
Kubernetes Prow Robot 2020-09-21 22:28:46 -07:00 committed by GitHub
commit 402b94f313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -589,7 +589,7 @@ func (m *kubeGenericRuntimeManager) computePodActions(pod *v1.Pod, podStatus *ku
// need to restart it.
if containerStatus == nil || containerStatus.State != kubecontainer.ContainerStateRunning {
if kubecontainer.ShouldContainerBeRestarted(&container, pod, podStatus) {
message := fmt.Sprintf("Container %+v is dead, but RestartPolicy says that we should restart it.", container)
message := fmt.Sprintf("Container %q of pod %q is not in the desired state and shall be started", container.Name, format.Pod(pod))
klog.V(3).Infof(message)
changes.ContainersToStart = append(changes.ContainersToStart, idx)
if containerStatus != nil && containerStatus.State == kubecontainer.ContainerStateUnknown {