Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to specify that the termination signal is a SIGTERM #2761

Closed
wants to merge 1 commit into from

Conversation

copyconstruct
Copy link

@copyconstruct copyconstruct commented Jul 1, 2017

Thee docs suggest that when the kill_timeout is specified, a task is sent a SIGINT. However, I'm seeing my task get a SIGTERM.

This comment by @dadgar also suggests that it's a SIGTERM that gets sent to a task.

Thee docs suggest that when the `kill_timeout` is specified, a task is sent a SIGINT. However, I'm seeing my task get a SIGTERM.

This comment by @dadgar also suggests that it's a SIGTERM that gets sent to a task. hashicorp#522
@copyconstruct copyconstruct changed the title A task is sent a SIGTERM during termination Update docs to specify that the termination signal is a SIGTERM Jul 1, 2017
@dadgar
Copy link
Contributor

dadgar commented Jul 1, 2017

@copyconstruct Hey,

Sorry for any confusion! A SIGINT is sent first and if it does not exit, after the kill timeout the following is called: https://golang.org/pkg/os/#Process.Kill.

On posix systems that is defined to be a SIGKILL (https://golang.org/src/os/exec_posix.go)

@dadgar dadgar closed this Jul 1, 2017
@multani
Copy link
Contributor

multani commented Jul 1, 2017

@copyconstruct Also see #2716 (in case you are using Docker)

@copyconstruct copyconstruct deleted the patch-1 branch July 1, 2017 14:06
@copyconstruct
Copy link
Author

copyconstruct commented Jul 1, 2017

@multani Ah, yes, I figured that out myself. I run both Docker containers using the Docker driver and static binaries using the raw_exec driver, but the Dockerized app was only ever receiving a SIGTERM, when it was expecting a SIGINT to start the graceful shutdown. This wasn't a problem with my static binary. After adding the line STOPSIGNAL SIGINT to my Dockerfile, everything works as expected. But thanks for linking me to that PR.

@dadgar This was exactly the problem I was running into. It'd be great if the docs update was pushed out to the site. I spent a good few hours scratching my head as to why this wasn't working.

Thanks!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants