Unverified Commit 9ef35289 authored by Alexander Brand's avatar Alexander Brand Committed by Paulo Pires

Restore check when getting container IP

parent 24415254
...@@ -422,11 +422,13 @@ func (dm *DockerManager) inspectContainer(id string, podName, podNamespace strin ...@@ -422,11 +422,13 @@ func (dm *DockerManager) inspectContainer(id string, podName, podNamespace strin
// Container that are running, restarting and paused // Container that are running, restarting and paused
status.State = kubecontainer.ContainerStateRunning status.State = kubecontainer.ContainerStateRunning
status.StartedAt = startedAt status.StartedAt = startedAt
ip, err = dm.determineContainerIP(podNamespace, podName, iResult) if containerProvidesPodIP(dockerName) {
// Kubelet doesn't handle the network error scenario ip, err = dm.determineContainerIP(podNamespace, podName, iResult)
if err != nil { // Kubelet doesn't handle the network error scenario
status.State = kubecontainer.ContainerStateUnknown if err != nil {
status.Message = fmt.Sprintf("Network error: %#v", err) status.State = kubecontainer.ContainerStateUnknown
status.Message = fmt.Sprintf("Network error: %#v", err)
}
} }
return &status, ip, nil return &status, ip, nil
} }
......
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