hashicorp/nomad · error
volume %q snapshot source %q is not compatible with these pa
Error message
volume %q snapshot source %q is not compatible with these parameters: %v
What it means
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.
Source
Thrown at plugins/csi/client.go:439
if err := c.ensureConnected(ctx); err != nil {
return nil, err
}
err := req.Validate()
if err != nil {
return nil, err
}
creq := req.ToCSIRepresentation()
resp, err := c.controllerClient.CreateVolume(ctx, creq, opts...)
// these standard gRPC error codes are overloaded with CSI-specific
// meanings, so translate them into user-understandable terms
// https://github.com/container-storage-interface/spec/blob/master/spec.md#createvolume-errors
if err != nil {
code := status.Code(err)
switch code {
case codes.InvalidArgument:
return nil, fmt.Errorf(
"volume %q snapshot source %q is not compatible with these parameters: %v",
req.Name, req.ContentSource, err)
case codes.NotFound:
return nil, fmt.Errorf(
"volume %q content source %q does not exist: %v",
req.Name, req.ContentSource, err)
case codes.AlreadyExists:
return nil, fmt.Errorf(
"volume %q already exists but is incompatible with these parameters: %v",
req.Name, err)
case codes.ResourceExhausted:
return nil, fmt.Errorf(
"unable to provision %q in accessible_topology: %v",
req.Name, err)
case codes.OutOfRange:
return nil, fmt.Errorf(
"unsupported capacity_range for volume %q: %v", req.Name, err)
case codes.Internal:View on GitHub (pinned to 482b49bf1a)
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.
Example fix
// before (nomad volume create spec.hcl with wrong capability)
capability { access_mode = "multi-node-multi-writer" }
// after (capability the plugin supports for snapshot restore)
capability { access_mode = "single-node-writer" } Defensive patterns
Strategy: validation
Validate before calling
// Validate snapshot ID and capabilities before creating from a content source
if vol.ContentSource != nil && vol.ContentSource.SnapshotID == "" {
return fmt.Errorf("content source requires a valid snapshot_id")
}
// ensure requested capability is in the plugin's reported ControllerGetCapabilities
if !pluginSupportsCapability(pluginCaps, reqCapability) {
return fmt.Errorf("capability %v not supported for snapshot restore", reqCapability)
} Type guard
func hasValidContentSource(req *csi.CreateVolumeRequest) bool {
return req.ContentSource == nil || req.ContentSource.SnapshotID != "" || req.ContentSource.VolumeId != ""
} Try / catch
vol, err := client.ControllerCreateVolume(ctx, req)
if err != nil && strings.Contains(err.Error(), "is not compatible with these parameters") {
// inspect err for gRPC InvalidArgument; fix capabilities/capacity and retry
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- CSI.ControllerListVolumes: plugin returned an invalid entry
- node %q has reached the maximum allowable number of attached
- volume %q is already published on another node and does not
- controller plugin returned an internal error, check the plug
- volume %q could not be found: %v
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/8fa917f7babc57ac.
Report an issue: GitHub.