open-nomad/client/allocrunner/interfaces
Tim Gross 64449cddc1 implement alloc runner task restart hook
Most allocation hooks don't need to know when a single task within the
allocation is restarted. The check watcher for group services triggers the
alloc runner to restart all tasks, but the alloc runner's `Restart` method
doesn't trigger any of the alloc hooks, including the group service hook. The
result is that after the first time a check triggers a restart, we'll never
restart the tasks of an allocation again.

This commit adds a `RunnerTaskRestartHook` interface so that alloc runner
hooks can act if a task within the alloc is restarted. The only implementation
is in the group service hook, which will force a re-registration of the
alloc's services and fix check restarts.
2021-01-22 10:55:40 -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 Revert "Revert "Use joint context to cancel prestart hooks"" 2019-10-08 11:34:09 -07:00