{"record":{"id":"a6a8a1013f324f0b","repo":"hashicorp/nomad","slug":"errplugindisabled","errorCode":"ErrPluginDisabled","errorMessage":"device is not enabled","messagePattern":"device is not enabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"info","filePath":"plugins/device/device.go","lineNumber":23,"sourceCode":"\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\tmultierror \"github.com/hashicorp/go-multierror\"\n\t\"github.com/hashicorp/nomad/plugins/base\"\n\t\"github.com/hashicorp/nomad/plugins/shared/structs\"\n)\n\nconst (\n\t// DeviceTypeGPU is a canonical device type for a GPU.\n\tDeviceTypeGPU = \"gpu\"\n)\n\nvar (\n\t// ErrPluginDisabled indicates that the device plugin is disabled\n\tErrPluginDisabled = fmt.Errorf(\"device is not enabled\")\n)\n\n// DevicePlugin is the interface for a plugin that can expose detected devices\n// to Nomad and inform it how to mount them.\ntype DevicePlugin interface {\n\tbase.BasePlugin\n\n\t// Fingerprint returns a stream of devices that are detected.\n\tFingerprint(ctx context.Context) (<-chan *FingerprintResponse, error)\n\n\t// Reserve is used to reserve a set of devices and retrieve mount\n\t// instructions.\n\tReserve(deviceIDs []string) (*ContainerReservation, error)\n\n\t// Stats returns a stream of statistics per device collected at the passed\n\t// interval.\n\tStats(ctx context.Context, interval time.Duration) (<-chan *StatsResponse, error)\n}","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/plugins/device/device.go#L5-L41","documentation":"ErrPluginDisabled is the sentinel error a Nomad device plugin returns when the plugin is not enabled. The device manager instance (client/devicemanager/instance.go) sees it from Fingerprint(), logs 'fingerprinting failed: plugin is not enabled', and treats it as a benign condition rather than a failure.","triggerScenarios":"DevicePlugin.Fingerprint(ctx) called by the device manager while the plugin is disabled — e.g. the plugin loader did not load/enable the device plugin for this client.","commonSituations":"Nomad client config omits or disables the device plugin (plugin stanza missing); plugin binary not in plugin_dir; `client.options`/device plugin disabled intentionally; operator checking logs and wondering why GPUs aren't detected.","solutions":["Enable the device plugin in the client config `plugin \"<name>\" {}` stanza and restart the Nomad agent","Confirm the plugin binary exists in plugin_dir and is built for the right OS/arch","If the plugin is intentionally disabled, ignore the log line — the manager handles it gracefully and simply never fingerprints devices for that plugin"],"exampleFix":"# before: no device plugin stanza\n# after (client.hcl)\nplugin \"nvidia-gpu\" {\n  config {\n    # ...\n  }\n}","handlingStrategy":"type-guard","validationCode":"// Go: check the sentinel before treating fingerprint failure as an error\nfingerprintCh, err := devicePlugin.Fingerprint(ctx)\nif errors.Is(err, device.ErrPluginDisabled) {\n    logger.Info(\"plugin not enabled; skipping\")\n    return nil\n}","typeGuard":"// Go: sentinel check helper\nfunc isPluginDisabled(err error) bool { return errors.Is(err, device.ErrPluginDisabled) }","tryCatchPattern":"// Go\nif err != nil {\n    if isPluginDisabled(err) {\n        return nil // graceful no-op\n    }\n    return err\n}","preventionTips":["Enable required device plugins in the client `plugin` stanza and plugin_dir","Treat ErrPluginDisabled as benign in device-manager consumers via errors.Is","Document intentional plugin disabling so operators don't chase the log line"],"tags":["devices","fingerprinting","plugin","configuration"],"backgroundTag":"plugin-disabled","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"}