drivers: set -1 exit code in case executor gets killed#25453
drivers: set -1 exit code in case executor gets killed#25453pkazmierczak merged 7 commits intomainfrom
Conversation
tgross
left a comment
There was a problem hiding this comment.
LGTM but we're seeing a build failure on test-windows in the rawexec driver package. It's not obvious to me why and the test run doesn't give more information than that.
Co-authored-by: Tim Gross <tgross@hashicorp.com>
Took me a while to figure it out, too. But it's an easy one: |
…p/nomad into b-exit-code-on-executor-failure
| // Kill the executor and wait until it's gone | ||
| pid := driverState.ReattachConfig.Pid | ||
| must.NoError(t, err) | ||
| must.NoError(t, syscall.Kill(pid, syscall.SIGKILL)) |
There was a problem hiding this comment.
I think we could use os.FindProcess and then (*Process) Kill to do this in a cross-platform way, but it's probably easier to just keep this unix-specific.
There was a problem hiding this comment.
I think there are other reasons we skip this test on non-unix systems, but yes. Will keep that in mind next time.
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Nomad driver handles incorrectly set exit code 0 in case of executor failure. This corrects that behavior.
Fixes #17782
Internal ref: https://hashicorp.atlassian.net/browse/NET-12155