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

API to stop task on the specially node or specially allocID #2181

Closed
xudawei opened this issue Jan 11, 2017 · 7 comments
Closed

API to stop task on the specially node or specially allocID #2181

xudawei opened this issue Jan 11, 2017 · 7 comments

Comments

@xudawei
Copy link

xudawei commented Jan 11, 2017

Have one api for stop the task on specially node or specially alloc-id

In my sight,if i had run a job with service and count equal 3 , some day i found one of the task worked not well . i hope to restart it or stop it , but i don't want to stop job , because it would be have down time . how can i kill the wrong task and restart it automaticlly .

how can i do ?

@jippi
Copy link
Contributor

jippi commented Jan 11, 2017

This is not possible today.

That kind of fine grained job control is planned, but AFAIK not in Q1 2017; hashicorp usually don't share their roadmap.

What I do today is kill the docker instance or task on the server directly using docker rm -f / docker stop or simply kill -9 the process (raw_exec & friends) - which will force nomad to restart the specific task.

Long term Nomad will be able to detect malfunctioning tasks using consul service health checks and will restart them on it's own initiative, but this is afaik also a bit out in the future :)

@dadgar
Copy link
Contributor

dadgar commented Jan 11, 2017

@xudawei There currently is not this ability but we would like to bring it. I am going to rename and tag as enhancement

@dadgar dadgar changed the title [Question] No api for stop task on the specially node or specially allocID API to stop task on the specially node or specially allocID Jan 11, 2017
@xudawei
Copy link
Author

xudawei commented Jan 11, 2017

@jippi @dadgar thank you for your replay . i got it

@dradtke
Copy link

dradtke commented Jan 21, 2017

This type of thing would be nice for enabling restarts for reasons other than task failure. For example, I'm working on an application that's deployed as a single binary, and when a new version is released, it would be nice to copy the new binary to the server and tell Nomad to restart it, rather than manually SIGHUP'ing it.

@jpialirci
Copy link

Is there status or a timeline for this enhancement? Thanks!

@tgross
Copy link
Member

tgross commented Mar 4, 2021

Implemented as nomad alloc stop and nomad alloc restart

@tgross tgross closed this as completed Mar 4, 2021
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants