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 lifecycle: add poststop hook (#8194) 2020-11-12 08:01:42 -08:00
alloc_runner_unix_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
allocdir_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
cgroup_hook.go client/ar: thread through cpuset manager 2021-04-13 13:28:36 -04:00
config.go client/ar: thread through cpuset manager 2021-04-13 13:28:36 -04:00
consul_grpc_sock_hook.go consul/connect: avoid warn messages on connect proxy errors 2021-08-05 11:27:35 +02:00
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/connect: fixup some spelling, comments, consts 2020-07-29 09:26:01 -05:00
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 consul: avoid triggering unnecessary sync when removing workload 2021-07-06 14:08:42 -05:00
health_hook.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
health_hook_test.go health: fail health if any task is pending 2020-03-22 11:13:41 -04:00
migrate_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
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 ar: isolate network actions performed by client 2021-02-02 23:24:57 -05:00
networking_bridge_linux.go networking: Ensure CNI iptables rules are appended to chain and not forced to be first 2021-04-15 10:11:15 -04:00
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 lifecycle: add poststop hook (#8194) 2020-11-12 08:01:42 -08:00
task_hook_coordinator_test.go test: add allocrunner test for poststart hooks 2020-08-12 09:54:14 -07:00
testing.go gofmt all the files 2021-10-01 10:14:28 -04:00
upstream_allocs_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
util.go