{"record":{"id":"5f516ca6753c05cc","repo":"hashicorp/nomad","slug":"task-group-volume-claim-does-not-exist","errorCode":null,"errorMessage":"task group volume claim does not exist","messagePattern":"task group volume claim does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"nomad/state/state_store_task_group_volume_claims.go","lineNumber":197,"sourceCode":"\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// DeleteTaskGroupHostVolumeClaim deletes a claim by its ID\nfunc (s *StateStore) DeleteTaskGroupHostVolumeClaim(index uint64, ns, claimID string) error {\n\ttxn := s.db.WriteTxnMsgT(structs.TaskGroupHostVolumeClaimDeleteRequestType, index)\n\tdefer txn.Abort()\n\n\tobj, err := txn.First(TableTaskGroupHostVolumeClaim, indexClaimID, claimID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"task group volume claim lookup failed: %v\", err)\n\t}\n\n\tif obj == nil {\n\t\treturn errors.New(\"task group volume claim does not exist\")\n\t}\n\tclaim := obj.(*structs.TaskGroupHostVolumeClaim)\n\tif claim.Namespace != ns {\n\t\treturn errors.New(\"task group volume claim does not exist\")\n\t}\n\n\tif err := txn.Delete(TableTaskGroupHostVolumeClaim, obj); err != nil {\n\t\treturn err\n\t}\n\n\tif err := txn.Insert(tableIndex, &IndexEntry{TableTaskGroupHostVolumeClaim, index}); err != nil {\n\t\treturn fmt.Errorf(\"index update failed: %w\", err)\n\t}\n\n\treturn txn.Commit()\n}\n\nfunc (s *StateStore) updateStickyVolumeClaimsFromAlloc(txn *txn, index uint64, alloc *structs.Allocation) error {","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store_task_group_volume_claims.go#L179-L215","documentation":"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.","triggerScenarios":"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.","commonSituations":"Node GC and allocation GC racing to release the same claim; restoring allocations whose claims were already cleaned; manual job stop followed by GC.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// claim deletes come from GC paths; treat not-exist as success\nif err := deleteClaim(claimID, ns); err != nil && strings.Contains(err.Error(), \"does not exist\") {\n    logger.Info(\"claim already released\", \"claimID\", claimID)\n    return nil\n}","preventionTips":["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."],"tags":["nomad","volumes","state-store","delete-not-found"],"backgroundTag":"resource-not-found","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"}