containerd/runtime/v2/runc
Brian Goff d7b9cb0019 shim: move event context timeout to publsher
Before this change, if an event fails to send on the first attempt,
subsequent attempts will fail with context.Cancelled because the the
caller of publish passes a cancellable timeout, which the publisher uses
to send the event.

The publisher returns immediately if the send fails, but adds the event
to an async queue to try again.
Meanwhile the caller will return cancelling the context.

Additionally, subsequent attempts may fail to send because the timeout
was expected to be for a single request but the queue sleeps for
`attempt*time.Second`.

In the shim service, the timeout was set to 5s, which means the send
will fail with context.DeadlineExceeded before it reaches `maxRequeue`
(which is currently 5).

This change moves the timeout to the publisher so each send attempt gets
its own timeout.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-07-20 17:51:10 -07:00
..
options vendor protobuf & grpc 2020-02-26 10:57:05 +09:00
v1 shim v2 runc: propagate options.Root to Cleanup 2020-06-17 19:06:36 +09:00
v2 shim: move event context timeout to publsher 2020-07-20 17:51:10 -07:00
container.go shim v2 runc: propagate options.Root to Cleanup 2020-06-17 19:06:36 +09:00
platform.go Handle large output in v2 shim with TTY 2019-10-11 15:42:05 -04:00
util.go Check error return from json.Unmarshal 2020-03-05 13:38:08 -05:00