From a337fe02c3544beeec31f6edc8a58a5779a3f73e Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Mon, 19 Jul 2021 10:49:31 -0700 Subject: [PATCH] Merge pull request #10849 from benbuzbee/benbuz/fix-destroy Don't treat a failed recover + successful destroy as a successful recover --- .changelog/10849.txt | 3 +++ client/allocrunner/taskrunner/task_runner.go | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .changelog/10849.txt diff --git a/.changelog/10849.txt b/.changelog/10849.txt new file mode 100644 index 000000000000..b595ace15ae1 --- /dev/null +++ b/.changelog/10849.txt @@ -0,0 +1,3 @@ +```release-note:bug +drivers: Fixed bug where Nomad incorrectly reported tasks as recovered successfully even when they were not. +``` diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index a584bdd78af7..a4ca21d0887a 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -1079,10 +1079,9 @@ func (tr *TaskRunner) restoreHandle(taskHandle *drivers.TaskHandle, net *drivers "error", err, "task_id", taskHandle.Config.ID) } - return false } - return true + return false } // Update driver handle on task runner