{"record":{"id":"eab307eab01d6e4a","repo":"hashicorp/nomad","slug":"failed-to-get-tainted-nodes-for-job-s-v-eab307","errorCode":null,"errorMessage":"failed to get tainted nodes for job '%s': %v","messagePattern":"failed to get tainted nodes for job '(.+?)': (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/scheduler_system.go","lineNumber":240,"sourceCode":"\ts.stack.SetJob(job)\n\ts.stack.SetSchedulerConfiguration(schedConfig.WithNodePool(pool))\n\treturn nil\n}\n\n// computeJobAllocs is used to reconcile differences between the job,\n// existing allocations and node status to update the allocations.\nfunc (s *SystemScheduler) computeJobAllocs() error {\n\t// Lookup the allocations by JobID\n\tws := memdb.NewWatchSet()\n\tallocs, err := s.state.AllocsByJob(ws, s.eval.Namespace, s.eval.JobID, true)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get allocs for job '%s': %v\", s.eval.JobID, err)\n\t}\n\n\t// Determine the tainted nodes containing job allocs\n\ttainted, err := taintedNodes(s.state, allocs)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get tainted nodes for job '%s': %v\", s.eval.JobID, err)\n\t}\n\n\t// Update the allocations which are in pending/running state on tainted\n\t// nodes to lost.\n\tupdateNonTerminalAllocsToLost(s.plan, tainted, allocs)\n\n\t// Split out terminal allocations\n\tlive, term := structs.SplitTerminalAllocs(allocs)\n\n\t// Diff the required and existing allocations\n\tnr := reconciler.NewNodeReconciler(s.deployment)\n\treconciliationResult := nr.Compute(s.job, s.nodes, s.notReadyNodes, tainted,\n\t\tlive, term)\n\tif s.logger.IsDebug() {\n\t\ts.logger.Debug(\"reconciled current state with desired state\", reconciliationResult.Fields()...)\n\t}\n\n\t// Update the stored deployment","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/scheduler_system.go#L222-L258","documentation":"SystemScheduler.computeJobAllocs failed to determine which tainted (drained/down) nodes hold the job's allocations, after successfully listing them. The wrapped error carries the state-store lookup cause.","triggerScenarios":"Thrown at scheduler/scheduler_system.go:240 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server logs for the node query failure","Rely on the scheduler's retry loop once the read recovers"],"exampleFix":null,"handlingStrategy":"retry","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"}