mirror of
https://github.com/containers/podman
synced 2024-10-21 01:34:37 +00:00
Fix Wait() to allow Exited state as well as Stopped
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
parent
7e23fb6c5d
commit
b7c5fa70ab
|
@ -423,7 +423,7 @@ func (c *Container) isStopped() (bool, error) {
|
|||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
return c.state.State == ContainerStateStopped, nil
|
||||
return (c.state.State == ContainerStateStopped || c.state.State == ContainerStateExited), nil
|
||||
}
|
||||
|
||||
// save container state to the database
|
||||
|
|
|
@ -457,7 +457,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
|
|||
if err != nil {
|
||||
if strings.Contains(string(out), "does not exist") {
|
||||
ctr.removeConmonFiles()
|
||||
ctr.state.State = ContainerStateConfigured
|
||||
ctr.state.State = ContainerStateExited
|
||||
return nil
|
||||
}
|
||||
return errors.Wrapf(err, "error getting container %s state. stderr/out: %s", ctr.ID(), out)
|
||||
|
|
Loading…
Reference in a new issue