hashicorp/nomad · error

error getting allocations: %v

Error message

error getting allocations: %v

What it means

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.

Source

Thrown at nomad/state/state_store.go:1596

		if err != nil {
			return fmt.Errorf("csi_plugins update error %s: %v", plug.ID, err)
		}
	}
	return nil
}

// deleteJobFromPlugins removes the allocations of this job from any plugins the job is
// running, possibly deleting the plugin if it's no longer in use. It's called in DeleteJobTxn
func (s *StateStore) deleteJobFromPlugins(index uint64, txn Txn, job *structs.Job) error {
	ws := memdb.NewWatchSet()
	summary, err := s.JobSummaryByID(ws, job.Namespace, job.ID)
	if err != nil {
		return fmt.Errorf("error getting job summary: %v", err)
	}

	allocs, err := s.AllocsByJob(ws, job.Namespace, job.ID, false)
	if err != nil {
		return fmt.Errorf("error getting allocations: %v", err)
	}

	type pair struct {
		pluginID string
		alloc    *structs.Allocation
	}

	plugAllocs := []*pair{}
	found := map[string]struct{}{}

	// Find plugins for allocs that belong to this job
	for _, a := range allocs {
		tg := a.Job.LookupTaskGroup(a.TaskGroup)
		found[tg.Name] = struct{}{}
		for _, t := range tg.Tasks {
			if t.CSIPluginConfig == nil {
				continue
			}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Retry the job deletion; the Raft apply may succeed on retry
  2. Check server logs for state store corruption or Raft errors
  3. Verify server health before retrying
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at nomad/state/state_store.go:1596 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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