hashicorp/nomad · error

could not query plugin: %v

Error message

could not query plugin: %v

What it means

Fires in controllerUnpublishVolume during volume detach: looking up the CSI plugin by ID in the state store failed (a Raft/state read error), so the controller RPC needed to detach cannot be issued.

Source

Thrown at nomad/csi_endpoint.go:899

func (v *CSIVolume) controllerUnpublishVolume(vol *structs.CSIVolume, claim *structs.CSIVolumeClaim) error {
	v.logger.Trace("controller unpublish", "vol", vol.ID)

	if !vol.ControllerRequired {
		claim.State = structs.CSIVolumeClaimStateReadyToFree
		return nil
	}

	// We need a new snapshot after each checkpoint
	snap, err := v.srv.fsm.State().Snapshot()
	if err != nil {
		return err
	}

	ws := memdb.NewWatchSet()

	plugin, err := snap.CSIPluginByID(ws, vol.PluginID)
	if err != nil {
		return fmt.Errorf("could not query plugin: %v", err)
	} else if plugin == nil {
		return fmt.Errorf("no such plugin: %q", vol.PluginID)
	}

	if !plugin.HasControllerCapability(structs.CSIControllerSupportsAttachDetach) {
		claim.State = structs.CSIVolumeClaimStateReadyToFree
		return nil
	}

	vol, err = snap.CSIVolumeDenormalize(ws, vol)
	if err != nil {
		return err
	}

	// we only send a controller detach if a Nomad client no longer has any
	// claim to the volume, so we need to check the status of any other claimed
	// allocations
	shouldCancel := func(alloc *structs.Allocation) bool {

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Check server logs for state store / Raft errors
  2. Retry the unpublish once the state store is healthy
  3. Verify cluster quorum and server health
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at nomad/csi_endpoint.go:899 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/91b66d97abd573eb. Report an issue: GitHub.