hashicorp/nomad · error
csi_volumes lookup failed: %v
Error message
csi_volumes lookup failed: %v
What it means
Returned by StateStore.CSIVolumes when the read transaction's txn.Get(TableCSIVolumes, "id") fails. This is a read-side iterator creation failure inside go-memdb — normally it means the index name is not in the table schema or the read transaction is invalid. It does NOT mean no volumes exist; an empty table returns a valid empty iterator.
Source
Thrown at nomad/state/state_store.go:2709
}
}
if err := txn.Insert("index", &IndexEntry{TableCSIVolumes, index}); err != nil {
return fmt.Errorf("index update failed: %v", err)
}
return txn.Commit()
}
// CSIVolumes returns the unfiltered list of all volumes. Caller should
// snapshot if it wants to also denormalize the plugins.
func (s *StateStore) CSIVolumes(ws memdb.WatchSet) (memdb.ResultIterator, error) {
txn := s.db.ReadTxn()
defer txn.Abort()
iter, err := txn.Get(TableCSIVolumes, "id")
if err != nil {
return nil, fmt.Errorf("csi_volumes lookup failed: %v", err)
}
ws.Add(iter.WatchCh())
return iter, nil
}
// CSIVolumeByID is used to lookup a single volume. Returns a copy of the
// volume because its plugins and allocations are denormalized to provide
// accurate Health.
func (s *StateStore) CSIVolumeByID(ws memdb.WatchSet, namespace, id string) (*structs.CSIVolume, error) {
txn := s.db.ReadTxn()
watchCh, obj, err := txn.FirstWatch(TableCSIVolumes, "id", namespace, id)
if err != nil {
return nil, fmt.Errorf("volume lookup failed for %s: %v", id, err)
}
ws.Add(watchCh)View on GitHub (pinned to 482b49bf1a)
Solutions
- Read the wrapped %v message to see the memdb error
- Restart the server to rebuild state from the raft log
- Confirm the running binary matches the official Nomad schema (no schema overrides)
- If persistent, capture nomad operator debug output and file a Nomad issue
Defensive patterns
Strategy: try-catch
Try / catch
vols, _, err := api.CSIVolumes()
if err != nil && strings.Contains(err.Error(), "csi_volumes lookup failed") {
// state store read failure: restart server or fail over to another server
} Prevention
- Run multiple Nomad servers for read failover
- Avoid in-place major-version upgrades without snapshot round-trip
- Watch server logs for early memdb warnings
- Use official Nomad builds only
When it happens
Trigger: Calling CSIVolumes (used by the CSI volume List API / nomad volume status command) while memdb cannot construct the "id" index iterator, e.g. schema mismatch or a corrupted read txn.
Common situations: Patched table schemas in forks; binary/state incompatibility after an in-place upgrade; extremely rare memdb internal failures.
Related errors
- volume lookup failed for %s: %v
- csi_plugin lookup error: %s %v
- csi_plugins insert error: %v
- csi_plugins lookup failed: %v
- csi_plugins lookup error %s: %v
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/6ea0f8c3cf550bfb.
Report an issue: GitHub.