containerd/runtime
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
..
linux/runctypes vendor protobuf & grpc 2020-02-26 10:57:05 +09:00
opts support cgroup2 2019-12-12 02:56:51 +09:00
restart restart plugin: support binary log uri 2020-06-10 00:09:24 +08:00
v1 Merge pull request #4204 from ashrayjain/aj/add-kill-retry 2020-06-03 11:10:43 -04:00
v2 shim: move event context timeout to publsher 2020-07-20 17:51:10 -07:00
events.go Licence header added 2018-02-19 10:32:26 +09:00
monitor.go Licence header added 2018-02-19 10:32:26 +09:00
runtime.go runtime: add Add/Delete method in PlatformRuntime interface 2018-12-29 13:56:38 +08:00
task_list.go Runtime v2 2018-07-17 10:21:29 -04:00
task.go Fast path getting pid from task 2019-07-26 17:48:00 +00:00
typeurl.go Licence header added 2018-02-19 10:32:26 +09:00