diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-05 04:41:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 04:41:41 -0500 |
commit | 42d4652fed759904bb51a5d3420724dc25009494 (patch) | |
tree | e75db0e16733dfbf688168293042e972f2b1c1c0 /pkg/domain/infra/abi/containers.go | |
parent | 4a0ae01261f2aa90c37d95b7cc4415682e96dead (diff) | |
parent | 05444cb2ccf29515e6cb8f2711c64213b7cb3325 (diff) | |
download | podman-42d4652fed759904bb51a5d3420724dc25009494.tar.gz podman-42d4652fed759904bb51a5d3420724dc25009494.tar.bz2 podman-42d4652fed759904bb51a5d3420724dc25009494.zip |
Merge pull request #9048 from matejvasek/apiv2_wait
Fix Docker APIv2 container wait endpoint
Diffstat (limited to 'pkg/domain/infra/abi/containers.go')
-rw-r--r-- | pkg/domain/infra/abi/containers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index d0599a595..7a672d863 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -100,7 +100,7 @@ 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()} - exitCode, err := c.WaitForConditionWithInterval(options.Interval, options.Condition) + exitCode, err := c.WaitForConditionWithInterval(ctx, options.Interval, options.Condition...) if err != nil { response.Error = err } else { @@ -728,7 +728,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri return reports, errors.Wrapf(err, "unable to start container %s", ctr.ID()) } - if ecode, err := ctr.Wait(); err != nil { + if ecode, err := ctr.Wait(ctx); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events event, err := ic.Libpod.GetLastContainerEvent(ctx, ctr.ID(), events.Exited) @@ -867,7 +867,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta return &report, err } - if ecode, err := ctr.Wait(); err != nil { + if ecode, err := ctr.Wait(ctx); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events event, err := ic.Libpod.GetLastContainerEvent(ctx, ctr.ID(), events.Exited) |