{"record":{"id":"b16e53bd1adcbffd","repo":"hashicorp/nomad","slug":"error-getting-allocations-v","errorCode":null,"errorMessage":"error getting allocations: %v","messagePattern":"error getting allocations: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":1596,"sourceCode":"\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"csi_plugins update error %s: %v\", plug.ID, err)\n\t\t}\n\t}\n\treturn nil\n}\n\n// deleteJobFromPlugins removes the allocations of this job from any plugins the job is\n// running, possibly deleting the plugin if it's no longer in use. It's called in DeleteJobTxn\nfunc (s *StateStore) deleteJobFromPlugins(index uint64, txn Txn, job *structs.Job) error {\n\tws := memdb.NewWatchSet()\n\tsummary, err := s.JobSummaryByID(ws, job.Namespace, job.ID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error getting job summary: %v\", err)\n\t}\n\n\tallocs, err := s.AllocsByJob(ws, job.Namespace, job.ID, false)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error getting allocations: %v\", err)\n\t}\n\n\ttype pair struct {\n\t\tpluginID string\n\t\talloc    *structs.Allocation\n\t}\n\n\tplugAllocs := []*pair{}\n\tfound := map[string]struct{}{}\n\n\t// Find plugins for allocs that belong to this job\n\tfor _, a := range allocs {\n\t\ttg := a.Job.LookupTaskGroup(a.TaskGroup)\n\t\tfound[tg.Name] = struct{}{}\n\t\tfor _, t := range tg.Tasks {\n\t\t\tif t.CSIPluginConfig == nil {\n\t\t\t\tcontinue\n\t\t\t}","sourceCodeStart":1578,"sourceCodeEnd":1614,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L1578-L1614","documentation":"Inside DeleteJobTxn, deleteJobFromPlugins could not read the job's allocations from the state store; the wrapped error comes from AllocsByJob and indicates a state-store/memdb access failure during job deletion.","triggerScenarios":"Thrown at nomad/state/state_store.go:1596 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the job deletion; the Raft apply may succeed on retry","Check server logs for state store corruption or Raft errors","Verify server health before retrying"],"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"}