Skip to content

Commit

Permalink
hashicorp#2563 fixed pending state for allocations with terminal status
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jul 9, 2017
1 parent 4cd2cf1 commit 5f9cd4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/alloc_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ func (r *AllocRunner) Run() {
// clean up the allocation.
if alloc.TerminalStatus() {
r.logger.Printf("[DEBUG] client: alloc %q in terminal status, waiting for destroy", r.alloc.ID)
// mark this allocation as completed.
r.setStatus(structs.AllocClientStatusComplete, "cancelled running tasks for allocation in terminal state")
r.handleDestroy()
r.logger.Printf("[DEBUG] client: terminating runner for alloc '%s'", r.alloc.ID)
return
Expand Down

0 comments on commit 5f9cd4f

Please sign in to comment.