mirror of https://github.com/containers/podman.git
Merge pull request #1587 from mheon/fix_pod_status
Fix pod status reporting for new Exited state
This commit is contained in:
commit
71c2681310
|
|
@ -528,6 +528,8 @@ func getAndSortPodJSONParams(pods []*libpod.Pod, opts podPsOptions, runtime *lib
|
|||
}
|
||||
var status string
|
||||
switch batchInfo.ConState {
|
||||
case libpod.ContainerStateExited:
|
||||
fallthrough
|
||||
case libpod.ContainerStateStopped:
|
||||
status = EXITED
|
||||
case libpod.ContainerStateRunning:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ func GetPodStatus(pod *libpod.Pod) (string, error) {
|
|||
}
|
||||
for _, ctrStatus := range ctrStatuses {
|
||||
switch ctrStatus {
|
||||
case libpod.ContainerStateExited:
|
||||
fallthrough
|
||||
case libpod.ContainerStateStopped:
|
||||
statuses[stopped]++
|
||||
case libpod.ContainerStateRunning:
|
||||
|
|
|
|||
Loading…
Reference in New Issue