Skip to content

Commit

Permalink
backport of commit fa0525e
Browse files Browse the repository at this point in the history
  • Loading branch information
stswidwinski committed Jul 19, 2023
1 parent 3da4aee commit 41b7265
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions client/allocrunner/alloc_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,19 @@ func (ar *allocRunner) killTasks() map[string]*structs.TaskState {
}
wg.Wait()

// Perform no action on post stop tasks, but retain their states if they exist. This
// commonly happens at the time of alloc GC from the client node.
for name, tr := range ar.tasks {
if !tr.IsPoststopTask() {
continue
}

state := tr.TaskState()
if state != nil {
states[name] = state
}
}

return states
}

Expand Down

0 comments on commit 41b7265

Please sign in to comment.