summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-02-01 20:21:03 +0100
committerMatej Vasek <mvasek@redhat.com>2021-02-03 21:49:09 +0100
commit570e1587dde267adea7fe460086dffee6aec83a4 (patch)
tree8b7570ae70bab43ceea4709c672adb3bc82cf80b /pkg
parent4e1bcf30f3a519490f58d66bc0aef16676f61ae8 (diff)
downloadpodman-570e1587dde267adea7fe460086dffee6aec83a4.tar.gz
podman-570e1587dde267adea7fe460086dffee6aec83a4.tar.bz2
podman-570e1587dde267adea7fe460086dffee6aec83a4.zip
Improve container libpod.Wait*() functions
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/infra/abi/containers.go6
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..cfd3d7272 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)