diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-08 11:09:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 11:09:28 -0700 |
commit | 71c2681310d1286d6ed465388373a3456944468b (patch) | |
tree | eeb6fdaca467fa959b181ebfe26e6918867bed9e /cmd/podman | |
parent | 44b79917d5f1ea1f4eb8cab85f9793a0711199e8 (diff) | |
parent | 82c754be2ce9eab573306c8e9901771b662dc5b7 (diff) | |
download | podman-71c2681310d1286d6ed465388373a3456944468b.tar.gz podman-71c2681310d1286d6ed465388373a3456944468b.tar.bz2 podman-71c2681310d1286d6ed465388373a3456944468b.zip |
Merge pull request #1587 from mheon/fix_pod_status
Fix pod status reporting for new Exited state
Diffstat (limited to 'cmd/podman')
-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: |