{"record":{"id":"ae1027bae5e765a6","repo":"hashicorp/nomad","slug":"only-a-single-eval-can-be-reblocked","errorCode":null,"errorMessage":"only a single eval can be reblocked","messagePattern":"only a single eval can be reblocked","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/eval_endpoint.go","lineNumber":385,"sourceCode":"}\n\n// Reblock is used to reinsert an existing blocked evaluation into the blocked\n// evaluation tracker.\nfunc (e *Eval) Reblock(args *structs.EvalUpdateRequest, reply *structs.GenericResponse) error {\n\taclObj, err := e.srv.AuthenticateServerOnly(e.ctx, args)\n\te.srv.MeasureRPCRate(\"eval\", structs.RateMetricWrite, args)\n\tif err != nil || !aclObj.AllowServerOp() {\n\t\treturn structs.ErrPermissionDenied\n\t}\n\n\tif done, err := e.srv.forward(\"Eval.Reblock\", args, args, reply); done {\n\t\treturn err\n\t}\n\tdefer metrics.MeasureSince([]string{\"nomad\", \"eval\", \"reblock\"}, time.Now())\n\n\t// Ensure there is only a single update with token\n\tif len(args.Evals) != 1 {\n\t\treturn fmt.Errorf(\"only a single eval can be reblocked\")\n\t}\n\teval := args.Evals[0]\n\n\t// Verify the evaluation is outstanding, and that the tokens match.\n\tif err := e.srv.evalBroker.OutstandingReset(eval.ID, args.EvalToken); err != nil {\n\t\treturn err\n\t}\n\n\t// Look for the eval\n\tsnap, err := e.srv.fsm.State().Snapshot()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tws := memdb.NewWatchSet()\n\tout, err := snap.EvalByID(ws, eval.ID)\n\tif err != nil {\n\t\treturn err","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/eval_endpoint.go#L367-L403","documentation":"Guard in Eval.Reblock: the request does not contain exactly one evaluation; the blocked-eval tracker requires a single eval per reblock call to keep its token accounting consistent.","triggerScenarios":"Thrown at nomad/eval_endpoint.go:385 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reblock one evaluation per request"],"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"}