summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-10-03 15:34:34 -0400
committerMatthew Heon <mheon@redhat.com>2018-10-03 15:34:34 -0400
commit82c754be2ce9eab573306c8e9901771b662dc5b7 (patch)
treee05c31b9e2fdb196f103ff89be7249da3c1e3bc4 /cmd
parent3750b35ae2a22e7f7bc0070c5c2dadf1ef437074 (diff)
downloadpodman-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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/pod_ps.go2
-rw-r--r--cmd/podman/shared/pod.go2
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: