After all containers in a pod started. If any one container is still running,

or in the process of restarting, mark pod status running.

Fix #1758.
This commit is contained in:
Dawn Chen 2014-10-14 10:26:31 -07:00
parent c25294586f
commit f01fd8ff38
2 changed files with 2 additions and 2 deletions

View File

@ -311,7 +311,7 @@ func getPodStatus(pod *api.Pod, minions client.MinionInterface) (api.PodStatus,
}
}
switch {
case running > 0 && stopped == 0 && unknown == 0:
case running > 0 && unknown == 0:
return api.PodRunning, nil
case running == 0 && stopped > 0 && unknown == 0:
return api.PodTerminated, nil

View File

@ -496,7 +496,7 @@ func TestMakePodStatus(t *testing.T) {
Host: "machine",
},
},
api.PodWaiting,
api.PodRunning,
"mixed state #1",
},
{