open-nomad/client/allocrunner
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
..
interfaces task runner: fix goroutine leak in prestart hook (#11741) 2021-12-23 11:50:51 -05:00
state chore: fixup inconsistent method receiver names. (#11704) 2021-12-20 11:44:21 +01:00
taskrunner task runner: fix goroutine leak in prestart hook (#11741) 2021-12-23 11:50:51 -05:00
alloc_runner.go provide -no-shutdown-delay flag for job/alloc stop (#11596) 2021-12-13 14:54:53 -05:00
alloc_runner_hooks.go provide -no-shutdown-delay flag for job/alloc stop (#11596) 2021-12-13 14:54:53 -05:00
alloc_runner_test.go
alloc_runner_unix_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
allocdir_hook.go
cgroup_hook.go
config.go
consul_grpc_sock_hook.go
consul_grpc_sock_hook_test.go client: never embed alloc_dir in chroot 2021-10-18 09:22:01 -07:00
consul_http_sock_hook.go
consul_http_sock_hook_test.go test: update tests to properly use AllocDir 2021-10-19 10:49:07 -07:00
csi_hook.go chore: fixup inconsistent method receiver names. (#11704) 2021-12-20 11:44:21 +01:00
groupservice_hook.go provide -no-shutdown-delay flag for job/alloc stop (#11596) 2021-12-13 14:54:53 -05:00
groupservice_hook_test.go
health_hook.go
health_hook_test.go
migrate_hook.go
network_hook.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
network_hook_test.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
network_manager_linux.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
network_manager_linux_test.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
network_manager_nonlinux.go gofmt all the files 2021-10-01 10:14:28 -04:00
networking.go
networking_bridge_linux.go
networking_cni.go gofmt all the files 2021-10-01 10:14:28 -04:00
networking_cni_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
task_hook_coordinator.go
task_hook_coordinator_test.go
testing.go gofmt all the files 2021-10-01 10:14:28 -04:00
upstream_allocs_hook.go
util.go