Skip to content

Commit

Permalink
Merge pull request #2596 from weargoggles/deregister-before-kill
Browse files Browse the repository at this point in the history
Clean up consul earlier when destroying a task
  • Loading branch information
schmichael authored May 2, 2017
2 parents 3d3a32e + aa2da9e commit ba73ed5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/task_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba73ed5

Please sign in to comment.