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