Skip to content

Commit

Permalink
Merge pull request #2816 from capone212/fix-pending-state
Browse files Browse the repository at this point in the history
#2563 fixed pending state for allocations with terminal status
  • Loading branch information
schmichael authored Aug 4, 2017
2 parents 2cceedd + e271c28 commit 9692eef
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 @@ -758,6 +758,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.allocID)
// 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.allocID)
return
Expand Down

0 comments on commit 9692eef

Please sign in to comment.