From 5f9cd4f329c9fac62ce636590dd5ed6b32b2e4e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Jul 2017 16:18:06 +0300 Subject: [PATCH] #2563 fixed pending state for allocations with terminal status --- client/alloc_runner.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/alloc_runner.go b/client/alloc_runner.go index 9215967a751..ea695c2fa8a 100644 --- a/client/alloc_runner.go +++ b/client/alloc_runner.go @@ -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