Fix missing rescheduled idle runners.
In today's unattended upgrade, we have seen how the prewarming pool size dropped to (near) zero. This was based on lost Nomad allocations. The allocations got rescheduled, but not added again to Poseidon. The reason for this is a miscommunication between the Event Handling and the Nomad Manager. `removedByPoseidon` was true even if the runner was not removed by the manager, but an idle runner.
This commit is contained in:

committed by
Sebastian Serth

parent
67297ec5a2
commit
354c16cc37
@ -261,8 +261,10 @@ func (n *NomadEnvironment) AddRunner(r runner.Runner) {
|
||||
n.idleRunners.Add(r.ID(), r)
|
||||
}
|
||||
|
||||
func (n *NomadEnvironment) DeleteRunner(id string) {
|
||||
func (n *NomadEnvironment) DeleteRunner(id string) (ok bool) {
|
||||
_, ok = n.idleRunners.Get(id)
|
||||
n.idleRunners.Delete(id)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (n *NomadEnvironment) IdleRunnerCount() uint {
|
||||
|
Reference in New Issue
Block a user