diff options
author | Matthew Heon <mheon@redhat.com> | 2018-10-03 15:34:34 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2018-10-03 15:34:34 -0400 |
commit | 82c754be2ce9eab573306c8e9901771b662dc5b7 (patch) | |
tree | e05c31b9e2fdb196f103ff89be7249da3c1e3bc4 | |
parent | 3750b35ae2a22e7f7bc0070c5c2dadf1ef437074 (diff) | |
download | podman-82c754be2ce9eab573306c8e9901771b662dc5b7.tar.gz podman-82c754be2ce9eab573306c8e9901771b662dc5b7.tar.bz2 podman-82c754be2ce9eab573306c8e9901771b662dc5b7.zip |
Fix pod status reporting for new Exited state
Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r-- | cmd/podman/pod_ps.go | 2 | ||||
-rw-r--r-- | cmd/podman/shared/pod.go | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/pod_ps.go b/cmd/podman/pod_ps.go index 8fea3f588..85d4e51e2 100644 --- a/cmd/podman/pod_ps.go +++ b/cmd/podman/pod_ps.go @@ -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: diff --git a/cmd/podman/shared/pod.go b/cmd/podman/shared/pod.go index badc7a837..4e8e58c4d 100644 --- a/cmd/podman/shared/pod.go +++ b/cmd/podman/shared/pod.go @@ -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: |