hashicorp/nomad · warning
task group volume claim does not exist
Error message
task group volume claim does not exist
What it means
DeleteTaskGroupHostVolumeClaim first looks up the claim by its claim ID in the task_group_host_volume_claims table. If no object is found at that ID, it returns "task group volume claim does not exist". This is the lookup-miss variant of the error, raised before any namespace check.
Source
Thrown at nomad/state/state_store_task_group_volume_claims.go:197
}
}
}
return nil
}
// DeleteTaskGroupHostVolumeClaim deletes a claim by its ID
func (s *StateStore) DeleteTaskGroupHostVolumeClaim(index uint64, ns, claimID string) error {
txn := s.db.WriteTxnMsgT(structs.TaskGroupHostVolumeClaimDeleteRequestType, index)
defer txn.Abort()
obj, err := txn.First(TableTaskGroupHostVolumeClaim, indexClaimID, claimID)
if err != nil {
return fmt.Errorf("task group volume claim lookup failed: %v", err)
}
if obj == nil {
return errors.New("task group volume claim does not exist")
}
claim := obj.(*structs.TaskGroupHostVolumeClaim)
if claim.Namespace != ns {
return errors.New("task group volume claim does not exist")
}
if err := txn.Delete(TableTaskGroupHostVolumeClaim, obj); err != nil {
return err
}
if err := txn.Insert(tableIndex, &IndexEntry{TableTaskGroupHostVolumeClaim, index}); err != nil {
return fmt.Errorf("index update failed: %w", err)
}
return txn.Commit()
}
func (s *StateStore) updateStickyVolumeClaimsFromAlloc(txn *txn, index uint64, alloc *structs.Allocation) error {View on GitHub (pinned to 482b49bf1a)
Solutions
- Treat the error as idempotent success — the claim is already released, which is the desired state.
- Verify the claim ID exists via job/allocation inspection before issuing the delete.
- If the claim should exist, check the job spec's volume block IDs for typos.
Defensive patterns
Strategy: fallback
Try / catch
// claim deletes come from GC paths; treat not-exist as success
if err := deleteClaim(claimID, ns); err != nil && strings.Contains(err.Error(), "does not exist") {
logger.Info("claim already released", "claimID", claimID)
return nil
} Prevention
- Expect claims to be released by job stop/GC before your delete runs.
- Don't re-issue claim deletes for the same allocation twice.
- Log claim IDs so double-GC races are diagnosable.
When it happens
Trigger: TaskGroupHostVolumeClaim delete apply (via allocation GC / claim release Raft op) with a claim ID absent from the table; double GC where a second pass re-claims an already-deleted ID.
Common situations: Node GC and allocation GC racing to release the same claim; restoring allocations whose claims were already cleaned; manual job stop followed by GC.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- ACL role not found
- service registration not found
- deleting job volume claims failed: %v
- error parsing: root should be an object
- cannot specify Accessor ID
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/5f516ca6753c05cc.
Report an issue: GitHub.