{"record":{"id":"8fa917f7babc57ac","repo":"hashicorp/nomad","slug":"volume-q-snapshot-source-q-is-not-compatible-wit","errorCode":null,"errorMessage":"volume %q snapshot source %q is not compatible with these parameters: %v","messagePattern":"volume %q snapshot source %q is not compatible with these parameters: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/csi/client.go","lineNumber":439,"sourceCode":"\tif err := c.ensureConnected(ctx); err != nil {\n\t\treturn nil, err\n\t}\n\n\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:","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/plugins/csi/client.go#L421-L457","documentation":"ControllerCreateVolume in the Nomad CSI client asked the CSI controller plugin to create a volume from a snapshot/content source, and the plugin replied with gRPC code InvalidArgument. Nomad translates that into this message: the requested content source is not compatible with the parameters (capacity, capabilities, etc.) sent in the CreateVolumeRequest. It indicates a mismatch between what Nomad passed and what the plugin accepts for volume creation from a snapshot.","triggerScenarios":"Calling ControllerCreateVolume (via a CSI plugin in Nomad) where req.ContentSource points to a snapshot and the plugin returns codes.InvalidArgument — e.g. snapshot ID malformed, requested capabilities unsupported for snapshot restore, or capacity range invalid for restoring that snapshot.","commonSituations":"Wrong or mistyped snapshot/secret ID in the volume spec; snapshot taken with different volume capabilities than requested; plugin version that doesn't support the requested access mode/capability when restoring; capacity_range smaller than the snapshot's size.","solutions":["Verify the snapshot/content-source ID in the volume spec is correct and exists in the storage backend.","Check the volume's requested capabilities (access mode, filesystem) match those supported for snapshot restore by the plugin; run `nomad plugin status` and consult the plugin docs.","Ensure capacity_range is at least the snapshot's original size or omit it so the plugin defaults.","Upgrade or reconfigure the CSI plugin to a version that supports CREATE from ContentSource snapshots.","Inspect the wrapped gRPC error (%v tail) for the exact parameter the plugin rejected."],"exampleFix":"// before (nomad volume create spec.hcl with wrong capability)\ncapability { access_mode = \"multi-node-multi-writer\" }\n// after (capability the plugin supports for snapshot restore)\ncapability { access_mode = \"single-node-writer\" }","handlingStrategy":"validation","validationCode":"// Validate snapshot ID and capabilities before creating from a content source\nif vol.ContentSource != nil && vol.ContentSource.SnapshotID == \"\" {\n    return fmt.Errorf(\"content source requires a valid snapshot_id\")\n}\n// ensure requested capability is in the plugin's reported ControllerGetCapabilities\nif !pluginSupportsCapability(pluginCaps, reqCapability) {\n    return fmt.Errorf(\"capability %v not supported for snapshot restore\", reqCapability)\n}","typeGuard":"func hasValidContentSource(req *csi.CreateVolumeRequest) bool {\n    return req.ContentSource == nil || req.ContentSource.SnapshotID != \"\" || req.ContentSource.VolumeId != \"\"\n}","tryCatchPattern":"vol, err := client.ControllerCreateVolume(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"is not compatible with these parameters\") {\n    // inspect err for gRPC InvalidArgument; fix capabilities/capacity and retry\n}","preventionTips":["Match volume capabilities against the plugin's GetCapabilities output before requesting snapshot restore.","Validate snapshot IDs against the backend before creating volumes from them.","Keep capacity requests at or above the snapshot's original size."],"tags":["csi","grpc","storage","invalid-argument"],"backgroundTag":"csi-invalid-argument","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"}