{"record":{"id":"828efb9f8c23c800","repo":"hashicorp/nomad","slug":"volume-q-content-source-q-does-not-exist-v","errorCode":null,"errorMessage":"volume %q content source %q does not exist: %v","messagePattern":"volume %q content source %q does not exist: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/csi/client.go","lineNumber":443,"sourceCode":"\terr := req.Validate()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcreq := req.ToCSIRepresentation()\n\tresp, err := c.controllerClient.CreateVolume(ctx, creq, opts...)\n\n\t// these standard gRPC error codes are overloaded with CSI-specific\n\t// meanings, so translate them into user-understandable terms\n\t// https://github.com/container-storage-interface/spec/blob/master/spec.md#createvolume-errors\n\tif err != nil {\n\t\tcode := status.Code(err)\n\t\tswitch code {\n\t\tcase codes.InvalidArgument:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"volume %q snapshot source %q is not compatible with these parameters: %v\",\n\t\t\t\treq.Name, req.ContentSource, err)\n\t\tcase codes.NotFound:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"volume %q content source %q does not exist: %v\",\n\t\t\t\treq.Name, req.ContentSource, err)\n\t\tcase codes.AlreadyExists:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"volume %q already exists but is incompatible with these parameters: %v\",\n\t\t\t\treq.Name, err)\n\t\tcase codes.ResourceExhausted:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"unable to provision %q in accessible_topology: %v\",\n\t\t\t\treq.Name, err)\n\t\tcase codes.OutOfRange:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"unsupported capacity_range for volume %q: %v\", req.Name, err)\n\t\tcase codes.Internal:\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"controller plugin returned an internal error, check the plugin allocation logs for more information: %v\", err)\n\t\t}\n\t\treturn nil, err","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/plugins/csi/client.go#L425-L461","documentation":"ControllerCreateVolume received gRPC code NotFound from the CSI plugin when the request carried a ContentSource (snapshot or volume to clone). Nomad wraps this as \"content source does not exist\": the snapshot or source volume referenced in the request could not be found by the plugin. It is a lookup failure of the source object, not the target volume.","triggerScenarios":"Calling ControllerCreateVolume with req.ContentSource set (snapshot_id or source volume) where the plugin returns codes.NotFound — the snapshot/source volume ID doesn't exist, was deleted, or belongs to a different storage cluster/tenant.","commonSituations":"Typo in the snapshot ID in the volume spec; snapshot pruned by retention policy before restore; creating the volume against a plugin instance pointed at a different region/cluster than where the snapshot lives; cross-namespace snapshot reference.","solutions":["Confirm the snapshot/source volume ID exists in the storage backend (list snapshots via the storage vendor's CLI/console).","Check that the CSI plugin is configured for the same region/account/cluster as the snapshot.","Recreate the snapshot if it was removed by a retention or cleanup job.","Fix the `source_volume`/`snapshot_id` field in the volume spec and re-run `nomad volume create`."],"exampleFix":"// before\ntype = \"csi\"\nsource_volume = \"vol-0123abc\"\n// after (existing volume in the same cluster)\ntype = \"csi\"\nsource_volume = \"vol-0456def\"","handlingStrategy":"validation","validationCode":"// Pre-check that the source volume/snapshot exists before create-from-source\nif vol.SourceVolumeID != \"\" {\n    if _, err := lookupBackendVolume(vol.SourceVolumeID); err != nil {\n        return fmt.Errorf(\"source volume %s not found in backend: %w\", vol.SourceVolumeID, err)\n    }\n}","typeGuard":"func contentSourceExists(src *csi.ContentSource) bool {\n    return src != nil && (src.SnapshotID != \"\" || src.VolumeId != \"\")\n}","tryCatchPattern":"vol, err := client.ControllerCreateVolume(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"content source\") && strings.Contains(err.Error(), \"does not exist\") {\n    // re-resolve snapshot/source ID, then retry with corrected reference\n}","preventionTips":["Verify snapshot/source volume IDs exist in the same region/account as the plugin target.","Account for snapshot retention policies before referencing old snapshots.","Use infrastructure-as-code so source IDs are generated consistently, not hand-typed."],"tags":["csi","grpc","storage","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"}