Merge pull request #2596 from weargoggles/deregister-before-kill

Clean up consul earlier when destroying a task
This commit is contained in:
Michael Schurter
2017-05-02 10:31:35 -07:00
committed by GitHub

View File

@@ -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