Merge pull request #1777 from dchen1107/status

After all containers in a pod started, If any one container is still run...
This commit is contained in:
Daniel Smith 2014-10-14 10:55:46 -07:00
commit c135f8a83e
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 { switch {
case running > 0 && stopped == 0 && unknown == 0: case running > 0 && unknown == 0:
return api.PodRunning, nil return api.PodRunning, nil
case running == 0 && stopped > 0 && unknown == 0: case running == 0 && stopped > 0 && unknown == 0:
return api.PodTerminated, nil return api.PodTerminated, nil

View File

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