hashicorp/nomad · error

unable to create job summary

Error message

unable to create job summary: %v

What it means

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.

Solutions

  1. Check server logs for the wrapped cause from updateSummaryWithJob
  2. Retry job registration (transaction rolled back atomically)
  3. Run a nomad operator reconcile / verify job_summary table via state store snapshots
  4. Upgrade Nomad if the error persists across registrations
Defensive patterns

Strategy: retry

Validate before calling

// Confirm the namespace exists and summary state is reachable
if _, err := client.Namespaces().Info(job.Namespace); err != nil {
  return fmt.Errorf("namespace %q invalid: %w", job.Namespace, err)
}

Type guard

func isSummaryError(err error) bool {
  return err != nil && strings.Contains(err.Error(), "unable to create job summary")
}

Try / catch

_, err := client.Jobs().Register(job, nil, nil, nil)
if isSummaryError(err) {
  // atomic rollback; re-submit restores/creates the summary
  _, err = client.Jobs().Register(job, nil, nil, nil)
}
return err

Prevention

When it happens

Trigger: 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).

Common situations: Cluster state inconsistencies, upgrades where summary records were not migrated, or bugs in summary reconciliation on servers handling many job registrations.

Related errors


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/ec9368be3b1ed475. Report an issue: GitHub.

Appendix: source

Thrown at nomad/state/state_store.go:1884

		job.ModifyIndex = index
		job.JobModifyIndex = index

		if err := s.setJobStatus(index, txn, job, false, ""); err != nil {
			return fmt.Errorf("setting job status for %q failed: %v", job.ID, err)
		}

		// Have to get the job again since it could have been updated
		updated, err := txn.First("jobs", "id", job.Namespace, job.ID)
		if err != nil {
			return fmt.Errorf("job lookup failed: %v", err)
		}
		if updated != nil {
			job = updated.(*structs.Job)
		}
	}

	if err := s.updateSummaryWithJob(index, job, txn); err != nil {
		return fmt.Errorf("unable to create job summary: %v", err)
	}

	if err := s.upsertJobVersion(index, job, txn); err != nil {
		return fmt.Errorf("unable to upsert job into job_version table: %v", err)
	}

	if err := s.updateJobScalingPolicies(index, job, txn); err != nil {
		return fmt.Errorf("unable to update job scaling policies: %v", err)
	}

	if err := s.updateJobRecommendations(index, txn, existingJob, job); err != nil {
		return fmt.Errorf("unable to update job recommendations: %v", err)
	}

	if err := s.updateJobCSIPlugins(index, job, existingJob, txn); err != nil {
		return fmt.Errorf("unable to update job csi plugins: %v", err)
	}

View on GitHub (pinned to 482b49bf1a)