hashicorp/nomad · error

plugin does not support snapshot

Error message

plugin does not support snapshot

What it means

Raised in CSIVolume.DeleteSnapshot when the plugin exists but lacks the CSI controller capability CSIControllerSupportsCreateDeleteSnapshot. Snapshot creation/deletion is a controller-level operation; a plugin registered as node-only (or whose controller does not advertise snapshot support) cannot delete snapshots, so a per-snapshot error is appended and the snapshot is skipped.

Source

Thrown at nomad/csi_endpoint.go:1727

	var mErr multierror.Error
	for _, snap := range args.Snapshots {
		if snap == nil {
			// we intentionally don't multierror here because we're in a weird state
			return fmt.Errorf("snapshot cannot be nil")
		}

		plugin, err := stateSnap.CSIPluginByID(nil, snap.PluginID)
		if err != nil {
			multierror.Append(&mErr,
				fmt.Errorf("could not query plugin %q: %v", snap.PluginID, err))
			continue
		}
		if plugin == nil {
			multierror.Append(&mErr, fmt.Errorf("no such plugin"))
			continue
		}
		if !plugin.HasControllerCapability(structs.CSIControllerSupportsCreateDeleteSnapshot) {
			multierror.Append(&mErr, fmt.Errorf("plugin does not support snapshot"))
			continue
		}

		method := "ClientCSI.ControllerDeleteSnapshot"

		cReq := &cstructs.ClientCSIControllerDeleteSnapshotRequest{
			ID:      snap.ID,
			Secrets: snap.Secrets,
		}
		cReq.PluginID = plugin.ID
		cResp := &cstructs.ClientCSIControllerDeleteSnapshotResponse{}
		err = v.serializedControllerRPC(plugin.ID, func() error {
			return v.srv.RPC(method, cReq, cResp)
		})
		if err != nil {
			multierror.Append(&mErr, fmt.Errorf("could not delete %q: %v", snap.ID, err))
		}
	}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Update the plugin job so the controller capability is enabled (ControllerRequired = true) and re-register the plugin.
  2. Verify the storage driver actually implements the CSI snapshot controller capability; if not, manage snapshots at the storage provider directly.
  3. Check `nomad plugin status <id>` for the plugin's controller capabilities before attempting snapshot operations.
  4. Use a plugin/driver version that supports snapshots if the current one does not.

Example fix

// before — plugin job without controller capability
type = "csi-plugin"
# controller block missing
// after
plugin {
  type = "csi-plugin"
  controller_required = true
  csi_plugin {
    id = "aws-ebs"
  }
}
Defensive patterns

Strategy: validation

Validate before calling

plug, _, _ := client.CSI().GetPlugin(pluginID, nil)
if plug == nil { return errors.New("plugin not registered") }
for _, c := range plug.Controllers {
    for _, cap := range c.Capabilities {
        if cap.Type == api.CSIControllerSupportsCreateDeleteSnapshot { return nil }
    }
}
return fmt.Errorf("plugin %s does not support snapshot delete", pluginID)

Type guard

func supportsSnapshotDelete(p *api.CSIPlugin) bool {
    if p == nil { return false }
    for _, c := range p.Controllers {
        for _, cap := range c.Capabilities {
            if cap.Type == api.CSIControllerSupportsCreateDeleteSnapshot { return true }
        }
    }
    return false
}

Try / catch

if strings.Contains(err.Error(), "plugin does not support snapshot") {
    log.Printf("snapshot %s must be managed at the storage provider directly", snapID)
    return nil
}

Prevention

When it happens

Trigger: Calling DeleteSnapshot against a plugin whose ControllerRequired/Capabilities do not include CSIControllerSupportsCreateDeleteSnapshot — e.g. a node-only plugin, or a controller whose CSI driver does not implement CREATE_DELETE_SNAPSHOT.

Common situations: Deploying a plugin job without controller capability (ControllerRequired missing/false); using a storage driver whose controller does not support snapshots; Nomad plugin registration differing from what the CSI driver actually supports.

Related errors


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/91ab1c2ab3268346. Report an issue: GitHub.