open-nomad/client/allocrunner/interfaces
Tim Gross 265e488ab4
task runner: fix goroutine leak in prestart hook (#11741)
The task runner prestart hooks take a `joincontext` so they have the
option to exit early if either of two contexts are canceled: from
killing the task or client shutdown. Some tasks exit without being
shutdown from the server, so neither of the joined contexts ever gets
canceled and we leak the `joincontext` (48 bytes) and its internal
goroutine. This primarily impacts batch jobs and any task that fails
or completes early such as non-sidecar prestart lifecycle tasks.
Cancel the `joincontext` after the prestart call exits to fix the
leak.
2021-12-23 11:50:51 -05:00
..
runner.go client: add NetworkStatus to Allocation (#8657) 2020-10-12 13:43:04 -04:00
runner_lifecycle.go implement alloc runner task restart hook 2021-01-22 10:55:40 -05:00
task_lifecycle.go task runner: fix goroutine leak in prestart hook (#11741) 2021-12-23 11:50:51 -05:00