hashicorp/nomad · error

evaluation %q is not already in a blocked state

Error message

evaluation %q is not already in a blocked state

What it means

Returned by PlanBuilder.ReblockEval when the evaluation's stored status is not "blocked". Only evaluations that were previously blocked by the blocked eval tracker may be re-enqueued for another pass.

Source

Thrown at scheduler/structs/structs.go:230

}

func (p *PlanBuilder) ReblockEval(eval *structs.Evaluation) error {
	// Ensure sequential plan application
	p.planLock.Lock()
	defer p.planLock.Unlock()

	// Check that the evaluation was already blocked.
	ws := memdb.NewWatchSet()
	old, err := p.State.EvalByID(ws, eval.ID)
	if err != nil {
		return err
	}

	if old == nil {
		return fmt.Errorf("evaluation does not exist to be reblocked")
	}
	if old.Status != structs.EvalStatusBlocked {
		return fmt.Errorf("evaluation %q is not already in a blocked state", old.ID)
	}

	p.ReblockEvals = append(p.ReblockEvals, eval)
	return nil
}

func (p *PlanBuilder) ServersMeetMinimumVersion(_ *version.Version, _ bool) bool {
	return p.serversMeetMinimumVersion
}

// NextIndex returns the next index
func (p *PlanBuilder) NextIndex() uint64 {
	p.nextIndexLock.Lock()
	defer p.nextIndexLock.Unlock()
	idx := p.nextIndex
	p.nextIndex += 1
	return idx
}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Only submit evals in the blocked state to ReblockEval
  2. Check for concurrent transitions that already unblocked the eval
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scheduler/structs/structs.go:230 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/5e8f5c22d366d6c4. Report an issue: GitHub.