Skip to content

Commit

Permalink
client: do not run ar cleanup hooks if client is shutting down
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Jan 24, 2023
1 parent 672dc16 commit 137ce0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/allocrunner/alloc_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,9 @@ func (ar *allocRunner) handleTaskStateUpdates() {
} else {
// there are no live runners left

// run AR pre-kill hooks if this alloc is terminal; any post-stop
// tasks would regularly run in this state anyway (?)
if done {
// run AR pre-kill hooks if this alloc is done, but not if it's because
// the agent is shutting down.
if !ar.isShuttingDown() && done {
ar.preKillHooks()
}

Expand Down

0 comments on commit 137ce0b

Please sign in to comment.