{"record":{"id":"ec9368be3b1ed475","repo":"hashicorp/nomad","slug":"unable-to-create-job-summary-v","errorCode":null,"errorMessage":"unable to create job summary: %v","messagePattern":"unable to create job summary: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":1884,"sourceCode":"\t\tjob.ModifyIndex = index\n\t\tjob.JobModifyIndex = index\n\n\t\tif err := s.setJobStatus(index, txn, job, false, \"\"); err != nil {\n\t\t\treturn fmt.Errorf(\"setting job status for %q failed: %v\", job.ID, err)\n\t\t}\n\n\t\t// Have to get the job again since it could have been updated\n\t\tupdated, err := txn.First(\"jobs\", \"id\", job.Namespace, job.ID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"job lookup failed: %v\", err)\n\t\t}\n\t\tif updated != nil {\n\t\t\tjob = updated.(*structs.Job)\n\t\t}\n\t}\n\n\tif err := s.updateSummaryWithJob(index, job, txn); err != nil {\n\t\treturn fmt.Errorf(\"unable to create job summary: %v\", err)\n\t}\n\n\tif err := s.upsertJobVersion(index, job, txn); err != nil {\n\t\treturn fmt.Errorf(\"unable to upsert job into job_version table: %v\", err)\n\t}\n\n\tif err := s.updateJobScalingPolicies(index, job, txn); err != nil {\n\t\treturn fmt.Errorf(\"unable to update job scaling policies: %v\", err)\n\t}\n\n\tif err := s.updateJobRecommendations(index, txn, existingJob, job); err != nil {\n\t\treturn fmt.Errorf(\"unable to update job recommendations: %v\", err)\n\t}\n\n\tif err := s.updateJobCSIPlugins(index, job, existingJob, txn); err != nil {\n\t\treturn fmt.Errorf(\"unable to update job csi plugins: %v\", err)\n\t}\n","sourceCodeStart":1866,"sourceCodeEnd":1902,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L1866-L1902","documentation":"During UpsertJob, updateSummaryWithJob failed to create/update the JobSummary table row that tracks queued/running allocations per task group for this job/namespace. The error is wrapped and the whole registration transaction is aborted.","triggerScenarios":"Registering a job where the summary update inside the transaction fails (insert/update into job_summary table errors, or internal inconsistency between job and summary records).","commonSituations":"Cluster state inconsistencies, upgrades where summary records were not migrated, or bugs in summary reconciliation on servers handling many job registrations.","solutions":["Check server logs for the wrapped cause from updateSummaryWithJob","Retry job registration (transaction rolled back atomically)","Run a nomad operator reconcile / verify job_summary table via state store snapshots","Upgrade Nomad if the error persists across registrations"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm the namespace exists and summary state is reachable\nif _, err := client.Namespaces().Info(job.Namespace); err != nil {\n  return fmt.Errorf(\"namespace %q invalid: %w\", job.Namespace, err)\n}","typeGuard":"func isSummaryError(err error) bool {\n  return err != nil && strings.Contains(err.Error(), \"unable to create job summary\")\n}","tryCatchPattern":"_, err := client.Jobs().Register(job, nil, nil, nil)\nif isSummaryError(err) {\n  // atomic rollback; re-submit restores/creates the summary\n  _, err = client.Jobs().Register(job, nil, nil, nil)\n}\nreturn err","preventionTips":["Re-register the job to rebuild its summary record","Check for summary inconsistencies after failed upgrades","Run nomad operator reconcile to realign summaries and allocations","Keep servers upgraded together to avoid schema drift"],"tags":["nomad","state-store","job-summary"],"backgroundTag":"job-summary-update-failed","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"}