Commit 44699f58 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #15238 from mpuncel/mpuncel/cleanup

Auto commit by PR queue bot
parents e8ae4892 4921a62f
...@@ -1660,7 +1660,6 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub ...@@ -1660,7 +1660,6 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub
containersToStart := make(map[int]empty) containersToStart := make(map[int]empty)
containersToKeep := make(map[kubeletTypes.DockerID]int) containersToKeep := make(map[kubeletTypes.DockerID]int)
createPodInfraContainer := false
var err error var err error
var podInfraContainerID kubeletTypes.DockerID var podInfraContainerID kubeletTypes.DockerID
...@@ -1674,7 +1673,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub ...@@ -1674,7 +1673,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub
} }
} }
createPodInfraContainer = true createPodInfraContainer := true
if podInfraContainer == nil { if podInfraContainer == nil {
glog.V(2).Infof("Need to restart pod infra container for %q because it is not found", podFullName) glog.V(2).Infof("Need to restart pod infra container for %q because it is not found", podFullName)
} else if changed { } else if changed {
...@@ -1707,7 +1706,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub ...@@ -1707,7 +1706,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub
if createPodInfraContainer { if createPodInfraContainer {
// createPodInfraContainer == true and Container exists // createPodInfraContainer == true and Container exists
// If we're creating infra containere everything will be killed anyway // If we're creating infra container everything will be killed anyway
// If RestartPolicy is Always or OnFailure we restart containers that were running before we // If RestartPolicy is Always or OnFailure we restart containers that were running before we
// killed them when restarting Infra Container. // killed them when restarting Infra Container.
if pod.Spec.RestartPolicy != api.RestartPolicyNever { if pod.Spec.RestartPolicy != api.RestartPolicyNever {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment