mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
Fix pod status reporting for new Exited state
Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user