containerd/runtime/v2/shim
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
..
publisher.go shim: move event context timeout to publsher 2020-07-20 17:51:10 -07:00
shim_darwin.go Abstract to SocketAddress 2018-07-27 12:39:53 -04:00
shim_freebsd.go Fix freebsd build 2018-12-16 14:27:42 +00:00
shim_linux.go Integrate sys.SetSubreaper, sys.GetSubreaper in sys/reaper package 2020-05-04 08:44:02 +02:00
shim_test.go test: TestRuntimeWithEmptyMaxEnvProcs should cleanup 2020-04-23 22:09:10 +08:00
shim_unix.go Unifi reaper logic into package 2019-08-16 13:55:05 +00:00
shim_windows.go Completely remove Windows v2 in-tree shim 2019-08-05 16:49:56 -07:00
shim.go add -v to shim binaries 2020-03-17 13:23:06 -04:00
util_unix.go Unify dialer implementations 2020-02-26 23:29:04 +02:00
util_windows.go fail on file not found for shim reconnect on containerd restart 2019-09-17 14:49:29 -07:00
util.go Pass ttrpc address to shim via env 2019-08-22 20:37:49 +00:00