summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-07-04 07:13:51 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-07-08 05:26:56 -0400
commit96dd57ca50de54e82cea177c317b92612ed1cf81 (patch)
treeeca8422dc0416feb0dc3e5f9600a07fb2a544b97 /pkg/domain
parenta2bcf833c98cb38eb28dc65a8768963d0b7344fc (diff)
downloadpodman-96dd57ca50de54e82cea177c317b92612ed1cf81.tar.gz
podman-96dd57ca50de54e82cea177c317b92612ed1cf81.tar.bz2
podman-96dd57ca50de54e82cea177c317b92612ed1cf81.zip
podman wait can take multiple conditions
Podman wait should not be defaulting to just stopped. By default wait API waits for stopped and exited. We should not override this on the client side. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/containers.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 1688be57e..23a591604 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -101,6 +101,9 @@ func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []strin
responses := make([]entities.WaitReport, 0, len(ctrs))
for _, c := range ctrs {
response := entities.WaitReport{Id: c.ID()}
+ if options.Condition == nil {
+ options.Condition = []define.ContainerStatus{define.ContainerStateStopped, define.ContainerStateExited}
+ }
exitCode, err := c.WaitForConditionWithInterval(ctx, options.Interval, options.Condition...)
if err != nil {
response.Error = err