{"record":{"id":"5e8f5c22d366d6c4","repo":"hashicorp/nomad","slug":"evaluation-q-is-not-already-in-a-blocked-state","errorCode":null,"errorMessage":"evaluation %q is not already in a blocked state","messagePattern":"evaluation %q is not already in a blocked state","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/structs/structs.go","lineNumber":230,"sourceCode":"}\n\nfunc (p *PlanBuilder) ReblockEval(eval *structs.Evaluation) error {\n\t// Ensure sequential plan application\n\tp.planLock.Lock()\n\tdefer p.planLock.Unlock()\n\n\t// Check that the evaluation was already blocked.\n\tws := memdb.NewWatchSet()\n\told, err := p.State.EvalByID(ws, eval.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif old == nil {\n\t\treturn fmt.Errorf(\"evaluation does not exist to be reblocked\")\n\t}\n\tif old.Status != structs.EvalStatusBlocked {\n\t\treturn fmt.Errorf(\"evaluation %q is not already in a blocked state\", old.ID)\n\t}\n\n\tp.ReblockEvals = append(p.ReblockEvals, eval)\n\treturn nil\n}\n\nfunc (p *PlanBuilder) ServersMeetMinimumVersion(_ *version.Version, _ bool) bool {\n\treturn p.serversMeetMinimumVersion\n}\n\n// NextIndex returns the next index\nfunc (p *PlanBuilder) NextIndex() uint64 {\n\tp.nextIndexLock.Lock()\n\tdefer p.nextIndexLock.Unlock()\n\tidx := p.nextIndex\n\tp.nextIndex += 1\n\treturn idx\n}","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/structs/structs.go#L212-L248","documentation":"Returned by PlanBuilder.ReblockEval when the evaluation's stored status is not \"blocked\". Only evaluations that were previously blocked by the blocked eval tracker may be re-enqueued for another pass.","triggerScenarios":"Thrown at scheduler/structs/structs.go:230 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only submit evals in the blocked state to ReblockEval","Check for concurrent transitions that already unblocked the eval"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}