Fix multiple user Runner use
A before unknown Nomad reload adds already known runner again to the idle runner - even if they are already in use.
This commit is contained in:

committed by
Sebastian Serth

parent
0d829c9308
commit
e0db1bafe8
@ -146,6 +146,11 @@ func (m *NomadRunnerManager) onAllocationAdded(alloc *nomadApi.Allocation, start
|
||||
return
|
||||
}
|
||||
|
||||
if _, ok := m.usedRunners.Get(alloc.JobID); ok {
|
||||
log.WithField("id", alloc.JobID).Debug("Started Runner is already in use")
|
||||
return
|
||||
}
|
||||
|
||||
environmentID, err := nomad.EnvironmentIDFromRunnerID(alloc.JobID)
|
||||
if err != nil {
|
||||
log.WithError(err).Warn("Allocation could not be added")
|
||||
|
Reference in New Issue
Block a user