{"record":{"id":"93a35a62f72e3c18","repo":"hashicorp/nomad","slug":"task-driver-q-for-q-does-not-support-csi","errorCode":null,"errorMessage":"task driver %q for %q does not support CSI","messagePattern":"task driver %q for %q does not support CSI","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/taskrunner/volume_hook.go","lineNumber":206,"sourceCode":"\t\t\tmcfg := &drivers.MountConfig{\n\t\t\t\tRequestName:     request.Name,\n\t\t\t\tHostPath:        csiMountPoint.Source,\n\t\t\t\tTaskPath:        m.Destination,\n\t\t\t\tReadonly:        request.ReadOnly || m.ReadOnly,\n\t\t\t\tPropagationMode: m.PropagationMode,\n\t\t\t\tSELinuxLabel:    m.SELinuxLabel,\n\t\t\t}\n\t\t\tmounts = append(mounts, mcfg)\n\t\t}\n\t}\n\n\tif len(mounts) > 0 {\n\t\tcaps, err := h.runner.DriverCapabilities()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not validate task driver capabilities: %v\", err)\n\t\t}\n\t\tif caps.MountConfigs == drivers.MountConfigSupportNone {\n\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\"task driver %q for %q does not support CSI\",\n\t\t\t\th.runner.task.Driver, h.runner.task.Name)\n\t\t}\n\t}\n\n\treturn mounts, nil\n}\n\nfunc (h *volumeHook) Prestart(ctx context.Context, req *interfaces.TaskPrestartRequest, resp *interfaces.TaskPrestartResponse) error {\n\th.taskEnv = req.TaskEnv\n\tinterpolateVolumeMounts(req.Task.VolumeMounts, h.taskEnv)\n\n\tvolumes := partitionVolumesByType(h.alloc.Job.LookupTaskGroup(h.alloc.TaskGroup).Volumes)\n\n\thostVolumeMounts, err := h.prepareHostVolumes(req, volumes[structs.VolumeTypeHost])\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/taskrunner/volume_hook.go#L188-L224","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Switch the task to a driver with CSI mount support (docker on a recent Nomad version is the standard choice)","Upgrade the Nomad client (>= 0.11 for CSI) and the driver plugin so MountConfigs >= MountConfigSupportRequired","Remove the CSI volume_mount from the task and provision storage another way (e.g. host volume, remote volume via app-level mounting)","Verify caps by checking the driver's capabilities in nomad node status and plugin docs"],"exampleFix":"// before\ntask \"worker\" {\n  driver = \"raw_exec\"\n  volume_mount { volume = \"csi-data\" }\n}\n// after\ntask \"worker\" {\n  driver = \"docker\"\n  volume_mount { volume = \"csi-data\" }\n}","handlingStrategy":"validation","validationCode":"// Check the driver supports CSI mounts before using CSI volume_mount:\n// nomad node status <id> -verbose lists driver capabilities;\n// require docker driver for CSI tasks in CI:\nif usesCSIMounts(task) && task.Driver != \"docker\" {\n    return fmt.Errorf(\"CSI mounts require a driver with MountConfigs support, got %q\", task.Driver)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use drivers with documented CSI mount support (docker) for tasks mounting CSI volumes","Run Nomad clients >= 0.11 (CSI GA) fleet-wide","Add constraints excluding clients whose driver versions lack MountConfigs support","Test volume_mounted workloads on a staging cluster before rollout"],"tags":["nomad","csi","driver-capabilities","prestart"],"backgroundTag":"driver-does-not-support-csi","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}