diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-02 12:36:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 12:36:04 -0400 |
commit | 22def2e2d98fd2ac4f6709bd094ee66bda9c648b (patch) | |
tree | 7e795ae88a3df174bb7d399a115c2178ec4fd93b /pkg/domain/infra | |
parent | c131567401bea2867d597d79cce75b99012e64fb (diff) | |
parent | 9e4cf6ca513fa0646f33ade14955e1fc4335e176 (diff) | |
download | podman-22def2e2d98fd2ac4f6709bd094ee66bda9c648b.tar.gz podman-22def2e2d98fd2ac4f6709bd094ee66bda9c648b.tar.bz2 podman-22def2e2d98fd2ac4f6709bd094ee66bda9c648b.zip |
Merge pull request #6838 from mheon/fix_panic_events
Fix `system service` panic from early hangup in events
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/containers.go | 4 | ||||
-rw-r--r-- | pkg/domain/infra/abi/events.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index 22de28a1c..f31ea3945 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -741,7 +741,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri if ecode, err := ctr.Wait(); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events - event, err := ic.Libpod.GetLastContainerEvent(ctr.ID(), events.Exited) + event, err := ic.Libpod.GetLastContainerEvent(ctx, ctr.ID(), events.Exited) if err != nil { logrus.Errorf("Cannot get exit code: %v", err) exitCode = define.ExecErrorCodeNotFound @@ -871,7 +871,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta if ecode, err := ctr.Wait(); err != nil { if errors.Cause(err) == define.ErrNoSuchCtr { // Check events - event, err := ic.Libpod.GetLastContainerEvent(ctr.ID(), events.Exited) + event, err := ic.Libpod.GetLastContainerEvent(ctx, ctr.ID(), events.Exited) if err != nil { logrus.Errorf("Cannot get exit code: %v", err) report.ExitCode = define.ExecErrorCodeNotFound diff --git a/pkg/domain/infra/abi/events.go b/pkg/domain/infra/abi/events.go index 7ec9db369..c999faeee 100644 --- a/pkg/domain/infra/abi/events.go +++ b/pkg/domain/infra/abi/events.go @@ -9,5 +9,5 @@ import ( func (ic *ContainerEngine) Events(ctx context.Context, opts entities.EventsOptions) error { readOpts := events.ReadOptions{FromStart: opts.FromStart, Stream: opts.Stream, Filters: opts.Filter, EventChannel: opts.EventChan, Since: opts.Since, Until: opts.Until} - return ic.Libpod.Events(readOpts) + return ic.Libpod.Events(ctx, readOpts) } |