Change default behavior in Nomad Event Handling

to not propagate that pending runners are being stopped.
This commit is contained in:
Maximilian Paß
2023-09-17 18:57:52 +02:00
committed by Sebastian Serth
parent 2eb15c8d93
commit 90d591d4ec
2 changed files with 4 additions and 3 deletions

View File

@@ -453,7 +453,8 @@ func handlePendingAllocationEvent(alloc *nomadApi.Allocation, allocData *allocat
stopExpected: stopExpected,
})
case structs.AllocDesiredStatusStop:
handleStoppingAllocationEvent(alloc, allocations, callbacks, false)
// As this allocation was still pending, we don't have to propagate its deletion.
allocations.Delete(alloc.ID)
// Anyway, we want to monitor the occurrences.
if !allocData.stopExpected {
log.WithField("alloc", alloc).Warn("Pending allocation was stopped unexpectedly")