mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge pull request #2596 from weargoggles/deregister-before-kill
Clean up consul earlier when destroying a task
This commit is contained in:
@@ -1031,6 +1031,10 @@ func (r *TaskRunner) run() {
|
||||
return
|
||||
}
|
||||
|
||||
// Remove from consul before killing the task so that traffic
|
||||
// can be rerouted
|
||||
r.consul.RemoveTask(r.alloc.ID, r.task)
|
||||
|
||||
// Store the task event that provides context on the task
|
||||
// destroy. The Killed event is set from the alloc_runner and
|
||||
// doesn't add detail
|
||||
|
||||
Reference in New Issue
Block a user