diff --git a/.changelog/26872.txt b/.changelog/26872.txt new file mode 100644 index 000000000..3a5163435 --- /dev/null +++ b/.changelog/26872.txt @@ -0,0 +1,3 @@ +```release-note:bug +state: Fixed a bug where the server could panic when attempting to remove unneeded evals from the eval broker +``` diff --git a/nomad/fsm.go b/nomad/fsm.go index c760b5caf..89b813c98 100644 --- a/nomad/fsm.go +++ b/nomad/fsm.go @@ -1034,7 +1034,7 @@ func (n *nomadFSM) applyAllocClientUpdate(msgType structs.MessageType, buf []byt "eval_id", evalID, "error", err) return err } - if !eval.ShouldEnqueue() { + if eval != nil && !eval.ShouldEnqueue() { n.evalBroker.DropWaiting(eval) } }