hashicorp/nomad · error

device ID must be specified

Error message

device ID must be specified

What it means

Device.Validate: the device ID is empty. Every device instance reported by a device plugin must carry a unique non-empty identifier used for scheduling accounting.

Source

Thrown at plugins/device/device.go:141

type Device struct {
	// ID is the identifier for the device.
	ID string

	// Healthy marks whether the device is healthy and can be used for
	// scheduling.
	Healthy bool

	// HealthDesc describes why the device may be unhealthy.
	HealthDesc string

	// HwLocality captures hardware locality information for the device.
	HwLocality *DeviceLocality
}

// Validate validates that the device is valid
func (d *Device) Validate() error {
	if d.ID == "" {
		return fmt.Errorf("device ID must be specified")
	}

	return nil
}

// DeviceLocality captures hardware locality information for a device.
type DeviceLocality struct {
	// PciBusID is the PCI bus ID of the device.
	PciBusID string
}

// ContainerReservation describes how to mount a device into a container. A
// container is an isolated environment that shares the host's OS.
type ContainerReservation struct {
	// Envs are a set of environment variables to set for the task.
	Envs map[string]string

	// Mounts are used to mount host volumes into a container that may include

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Fix the device plugin to assign every device instance a unique ID
  2. Verify the plugin's device listing logic populates the ID field
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugins/device/device.go:141 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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