mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
windows: set job object for executor and children (#24214)
On Windows, if the `raw_exec` driver's executor exits, the child processes are not also killed. Create a Windows "job object" (not to be confused with a Nomad job) and add the executor to it. Child processes of the executor will inherit the job automatically. When the handle to the job object is freed (on executor exit), the job itself is destroyed and this causes all processes in that job to exit. Fixes: https://github.com/hashicorp/nomad/issues/23668 Ref: https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects
This commit is contained in:
2
.github/workflows/test-windows.yml
vendored
2
.github/workflows/test-windows.yml
vendored
@@ -87,6 +87,8 @@ jobs:
|
||||
gotestsum --format=short-verbose \
|
||||
--junitfile results.xml \
|
||||
github.com/hashicorp/nomad/drivers/docker \
|
||||
github.com/hashicorp/nomad/drivers/rawexec \
|
||||
github.com/hashicorp/nomad/drivers/shared/executor \
|
||||
github.com/hashicorp/nomad/client/lib/fifo \
|
||||
github.com/hashicorp/nomad/client/logmon \
|
||||
github.com/hashicorp/nomad/client/allocrunner/taskrunner/template \
|
||||
|
||||
Reference in New Issue
Block a user