Fix pod status reporting for new Exited state
Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
parent
3750b35ae2
commit
82c754be2c
|
@ -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