mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
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:
parent
c25294586f
commit
f01fd8ff38
@ -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
|
||||
|
@ -496,7 +496,7 @@ func TestMakePodStatus(t *testing.T) {
|
||||
Host: "machine",
|
||||
},
|
||||
},
|
||||
api.PodWaiting,
|
||||
api.PodRunning,
|
||||
"mixed state #1",
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user