{"record":{"id":"b6bd7ab160e70b99","repo":"hashicorp/nomad","slug":"could-not-validate-task-driver-capabilities-v-b6bd7a","errorCode":null,"errorMessage":"could not validate task driver capabilities: %v","messagePattern":"could not validate task driver capabilities: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/taskrunner/volume_hook.go","lineNumber":142,"sourceCode":"\thostVolumes := h.runner.clientConfig.Node.HostVolumes\n\n\t// Always validate volumes to ensure that we do not allow volumes to be used\n\t// if a host is restarted and loses the host volume configuration.\n\tif err := validateHostVolumes(volumes, hostVolumes, req.Alloc.Name); err != nil {\n\t\th.logger.Error(\"Requested Host Volume does not exist\", \"existing\", hostVolumes, \"requested\", volumes)\n\t\treturn nil, fmt.Errorf(\"host volume validation error: %v\", err)\n\t}\n\n\thostVolumeMounts, err := h.hostVolumeMountConfigurations(req.Task.VolumeMounts, volumes, hostVolumes, req.Alloc.Name)\n\tif err != nil {\n\t\th.logger.Error(\"Failed to generate host volume mounts\", \"error\", err)\n\t\treturn nil, err\n\t}\n\n\tif len(hostVolumeMounts) > 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 host volumes\",\n\t\t\t\th.runner.task.Driver, h.runner.task.Name)\n\t\t}\n\t}\n\n\treturn hostVolumeMounts, nil\n}\n\n// partitionMountsByVolume takes a list of volume mounts and returns them in the\n// form of volume-alias:[]volume-mount because one volume may be mounted multiple\n// times.\nfunc partitionMountsByVolume(xs []*structs.VolumeMount) map[string][]*structs.VolumeMount {\n\tresult := make(map[string][]*structs.VolumeMount)\n\tfor _, mount := range xs {\n\t\tresult[mount.Volume] = append(result[mount.Volume], mount)","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/taskrunner/volume_hook.go#L124-L160","documentation":"If the task requests host volume mounts, prepareHostVolumes queries the task driver's capabilities via h.runner.DriverCapabilities(). If that call errors, this wrapped error is returned. A separate error covers the case where the driver supports no mount configs at all.","triggerScenarios":"len(hostVolumeMounts) > 0 and DriverCapabilities() returns a non-nil error — typically the driver plugin is unhealthy, crashed, or failed RPC while the task was starting.","commonSituations":"Docker/executor driver plugin crashed or being restarted during alloc start; driver version incompatibility after Nomad upgrade; resource exhaustion preventing the plugin from responding.","solutions":["Check driver plugin health (nomad node status; look for driver \"detected/healthy\" state)","Restart the nomad client agent to re-launch driver plugins","Retry allocation start — often transient if the plugin was mid-restart","Confirm driver version compatibility with the running Nomad client version"],"exampleFix":"// host shell: inspect driver health then restart client\nnomad node status -self | grep Drivers\nsudo systemctl restart nomad","handlingStrategy":"retry","validationCode":"// before scheduling volume-using tasks, confirm driver health\ncaps, err := driver.Capabilities()\nif err != nil || caps.MountConfigs == drivers.MountConfigSupportNone {\n    // don't place host-volume tasks on this node/driver\n}","typeGuard":null,"tryCatchPattern":"caps, err := runner.DriverCapabilities()\nif err != nil {\n    // transient plugin failure: brief backoff, retry capability probe\n    time.Sleep(500 * time.Millisecond)\n    caps, err = runner.DriverCapabilities()\n    if err != nil { return err }\n}","preventionTips":["Monitor driver plugin health on clients and alert on unhealthy drivers","Restart the nomad client after upgrades so all driver plugins are fresh","Avoid scheduling volume-dependent tasks while a client is mid-upgrade","Keep driver versions matched to the Nomad client version"],"tags":["nomad","volumes","driver","plugin"],"backgroundTag":"driver-capability-check-failed","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"}