hashicorp/nomad · error

task driver %q for %q does not support CSI

Error message

task driver %q for %q does not support CSI

What it means

After successfully fetching driver capabilities, prepareCSIVolumes rejects tasks with CSI mounts if caps.MountConfigs == drivers.MountConfigSupportNone, meaning the selected task driver cannot mount CSI volumes at all. Like error 760, this is a static capability gate in volumeHook.Prestart, so the allocation fails immediately rather than at runtime.

Source

Thrown at client/allocrunner/taskrunner/volume_hook.go:206

			mcfg := &drivers.MountConfig{
				RequestName:     request.Name,
				HostPath:        csiMountPoint.Source,
				TaskPath:        m.Destination,
				Readonly:        request.ReadOnly || m.ReadOnly,
				PropagationMode: m.PropagationMode,
				SELinuxLabel:    m.SELinuxLabel,
			}
			mounts = append(mounts, mcfg)
		}
	}

	if len(mounts) > 0 {
		caps, err := h.runner.DriverCapabilities()
		if err != nil {
			return nil, fmt.Errorf("could not validate task driver capabilities: %v", err)
		}
		if caps.MountConfigs == drivers.MountConfigSupportNone {
			return nil, fmt.Errorf(
				"task driver %q for %q does not support CSI",
				h.runner.task.Driver, h.runner.task.Name)
		}
	}

	return mounts, nil
}

func (h *volumeHook) Prestart(ctx context.Context, req *interfaces.TaskPrestartRequest, resp *interfaces.TaskPrestartResponse) error {
	h.taskEnv = req.TaskEnv
	interpolateVolumeMounts(req.Task.VolumeMounts, h.taskEnv)

	volumes := partitionVolumesByType(h.alloc.Job.LookupTaskGroup(h.alloc.TaskGroup).Volumes)

	hostVolumeMounts, err := h.prepareHostVolumes(req, volumes[structs.VolumeTypeHost])
	if err != nil {
		return err
	}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Switch the task to a driver with CSI mount support (docker on a recent Nomad version is the standard choice)
  2. Upgrade the Nomad client (>= 0.11 for CSI) and the driver plugin so MountConfigs >= MountConfigSupportRequired
  3. Remove the CSI volume_mount from the task and provision storage another way (e.g. host volume, remote volume via app-level mounting)
  4. Verify caps by checking the driver's capabilities in nomad node status and plugin docs

Example fix

// before
task "worker" {
  driver = "raw_exec"
  volume_mount { volume = "csi-data" }
}
// after
task "worker" {
  driver = "docker"
  volume_mount { volume = "csi-data" }
}
Defensive patterns

Strategy: validation

Validate before calling

// Check the driver supports CSI mounts before using CSI volume_mount:
// nomad node status <id> -verbose lists driver capabilities;
// require docker driver for CSI tasks in CI:
if usesCSIMounts(task) && task.Driver != "docker" {
    return fmt.Errorf("CSI mounts require a driver with MountConfigs support, got %q", task.Driver)
}

Prevention

When it happens

Trigger: Task declares volume_mount entries for group CSI volumes and the task driver (e.g. an older docker version, exec variant, or custom plugin) reports MountConfigSupportNone for MountConfigs in DriverCapabilities during Prestart.

Common situations: Using a driver that supports host volumes config but not CSI mounts (different capability levels); older Nomad client or driver plugin predating CSI mount support; pinning tasks to a driver via job constraints that excludes docker; custom community drivers without CSI support.

Related errors


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