{"record":{"id":"0673e89379383657","repo":"hashicorp/nomad","slug":"errdrivernotfound","errorCode":"ErrDriverNotFound","errorMessage":"driver not found","messagePattern":"driver not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/pluginmanager/drivermanager/manager.go","lineNumber":24,"sourceCode":"import (\n\t\"context\"\n\t\"fmt\"\n\t\"sync\"\n\n\tlog \"github.com/hashicorp/go-hclog\"\n\tplugin \"github.com/hashicorp/go-plugin\"\n\t\"github.com/hashicorp/nomad/client/pluginmanager\"\n\t\"github.com/hashicorp/nomad/client/pluginmanager/drivermanager/state\"\n\t\"github.com/hashicorp/nomad/helper/pluginutils/loader\"\n\t\"github.com/hashicorp/nomad/nomad/structs\"\n\t\"github.com/hashicorp/nomad/plugins/base\"\n\t\"github.com/hashicorp/nomad/plugins/drivers\"\n\tpstructs \"github.com/hashicorp/nomad/plugins/shared/structs\"\n)\n\n// ErrDriverNotFound is returned during Dispense when the requested driver\n// plugin is not found in the plugin catalog\nvar ErrDriverNotFound = fmt.Errorf(\"driver not found\")\n\n// Manager is the interface used to manage driver plugins\ntype Manager interface {\n\tpluginmanager.PluginManager\n\n\t// Dispense returns a drivers.DriverPlugin for the given driver plugin name\n\t// handling reattaching to an existing driver if available\n\tDispense(driver string) (drivers.DriverPlugin, error)\n}\n\n// TaskExecHandler is function to be called for executing commands in a task\ntype TaskExecHandler func(\n\tctx context.Context,\n\tcommand []string,\n\ttty bool,\n\tstream drivers.ExecTaskStream) error\n\n// EventHandler is a callback to be called for a task.","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/pluginmanager/drivermanager/manager.go#L6-L42","documentation":"ErrDriverNotFound is the sentinel error returned by the driver manager's Dispense when the requested driver plugin name is not present in the plugin catalog. Callers compare with errors.Is(err, ErrDriverNotFound) to detect that no driver of that name is registered on this client.","triggerScenarios":"manager.Dispense(driverName) is called with a driver name that has no entry in the manager's plugin catalog — the driver is not built into the client binary, not configured in the client 'plugin' blocks, or failed to register at startup.","commonSituations":"Task references a driver the Nomad client does not support (external plugin not installed); client config missing the plugin stanza for an external driver; driver failed to launch so it never registered; node fingerprint excludes the driver.","solutions":["Ensure the driver plugin binary is installed on the client and referenced in the client config plugin block","Verify with `nomad node status -verbose <node>` that the driver appears in the node's driver list","Fix any earlier plugin launch failures so the driver registers into the catalog at client startup","In code, check errors.Is(err, drivermanager.ErrDriverNotFound) and fall back to another node/driver"],"exampleFix":"// before (client.hcl) — task uses \"containerd-driver\" but nothing registered\n// after\nplugin \"containerd-driver\" {\n  config {\n    container_runtime = \"containerd\"\n  }\n}","handlingStrategy":"type-guard","validationCode":"// before submitting a job, check the node supports the driver\nnode, _, _ := client.Nodes().Info(nodeID)\nif drv := node.Drivers[driverName]; drv == nil || !drv.Detected {\n    return fmt.Errorf(\"node %s lacks driver %s\", nodeID, driverName)\n}","typeGuard":"func isDriverNotFound(err error) bool {\n    return errors.Is(err, drivermanager.ErrDriverNotFound)\n}","tryCatchPattern":"drv, err := mgr.Dispense(driverName)\nif err != nil {\n    if errors.Is(err, drivermanager.ErrDriverNotFound) {\n        return fmt.Errorf(\"install/configure driver %q on this client: %w\", driverName, err)\n    }\n    return err\n}","preventionTips":["Verify driver presence with `nomad node status -verbose` before scheduling","Include required plugin blocks in every client config via configuration management","Fingerprint drivers and constrain jobs with driver capability constraints","Alert on ErrDriverNotFound in client logs to catch missing plugin deployments"],"tags":["nomad","plugin","driver","catalog","sentinel-error"],"backgroundTag":"driver-not-found","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"}