Skip to content

Commit

Permalink
client: always run alloc cleanup hooks on last pass
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Jan 23, 2023
1 parent 43fa28a commit b1803a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/allocrunner/alloc_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,10 @@ func (ar *allocRunner) handleTaskStateUpdates() {
}
}

if len(liveRunners) > 0 {
// destroy all remaining live runners
// also run through the kill/cleanup hooks if this is the final run
if len(liveRunners) > 0 || done {

// if all live runners are sidecars - kill alloc
onlySidecarsRemaining := hasSidecars && !hasNonSidecarTasks(liveRunners)
if killEvent == nil && onlySidecarsRemaining {
Expand Down

0 comments on commit b1803a6

Please sign in to comment.