{"record":{"id":"edb882855dc55cb4","repo":"hashicorp/nomad","slug":"unexpectedly-did-not-forward-alloc-list-to-region","errorCode":null,"errorMessage":"unexpectedly did not forward Alloc.List to region %q","messagePattern":"unexpectedly did not forward Alloc\\.List to region %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/namespace_endpoint.go","lineNumber":359,"sourceCode":"\treturn true, nil\n}\n\n// namespaceTerminalAllocsInRegion returns true if the namespace contains only\n// terminal allocations in the given region.\nfunc (n *Namespace) namespaceTerminalAllocsInRegion(authToken, namespace, region string) (bool, error) {\n\tallocReq := &structs.AllocListRequest{\n\t\tQueryOptions: structs.QueryOptions{\n\t\t\tRegion:     region,\n\t\t\tNamespace:  namespace,\n\t\t\tAllowStale: false,\n\t\t\tAuthToken:  authToken,\n\t\t},\n\t}\n\n\tvar allocResp structs.AllocListResponse\n\tdone, err := n.srv.forward(\"Alloc.List\", allocReq, allocReq, &allocResp)\n\tif !done {\n\t\treturn false, fmt.Errorf(\"unexpectedly did not forward Alloc.List to region %q\", region)\n\t} else if err != nil {\n\t\treturn false, err\n\t}\n\n\tfor _, alloc := range allocResp.Allocations {\n\t\tif !alloc.ClientTerminalStatus() {\n\t\t\treturn false, nil\n\t\t}\n\t}\n\treturn true, nil\n}\n\n// namespaceNoAssociatedVolumesInRegion returns true if there are no volumes\n// associated with the namespace in the given region.\nfunc (n *Namespace) namespaceNoAssociatedVolumesInRegion(authToken, namespace, region string) (bool, error) {\n\tvolumesReq := &structs.CSIVolumeListRequest{\n\t\tQueryOptions: structs.QueryOptions{\n\t\t\tRegion:     region,","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/namespace_endpoint.go#L341-L377","documentation":"namespaceTerminalAllocsInRegion forwards an Alloc.List RPC to a remote region to check for non-terminal allocations before a namespace delete. If the forward helper reports done=false — the RPC was never handled remotely — the code returns this internal error naming the region, aborting the delete path.","triggerScenarios":"Namespace deletion in a multi-region setup where Alloc.List forwarding to a peer region fails; the remote region is down, deregistered from gossip, or the region name is wrong.","commonSituations":"Federated clusters where a region was decommissioned but cleanup still targets it; network partitions between datacenters; mistyped region names in tooling.","solutions":["Confirm the remote region is alive and federated (nomad server members in that region).","Check server logs for RPC/TLS/network errors toward that region.","Remove stale region references from tooling or restore connectivity, then retry."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"for _, region := range regions {\n    if _, _, err := client.Agent().MembersOpts(&api.QueryOptions{Region: region}); err != nil {\n        return fmt.Errorf(\"region %s unreachable before alloc check: %w\", region, err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"did not forward Alloc.List\") {\n    // check server logs / region health, restore federation, retry\n}","preventionTips":["Confirm target regions are alive before multi-region namespace deletes.","Alert on cross-region RPC failures.","Decommission region references when a datacenter is removed.","Retry with backoff only after connectivity is restored."],"tags":["nomad","rpc-forwarding","multi-region"],"backgroundTag":"rpc-forward-failed","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"}