hashicorp/nomad · error

CSI.ControllerCreateVolume: plugin did not return error or v

Error message

CSI.ControllerCreateVolume: plugin did not return error or volume

What it means

Returned when the CSI plugin's ControllerCreateVolume succeeds without error but returns no volume object (nil response or nil Volume). Nomad treats this as a plugin protocol violation: CSI spec says a successful CreateVolume must return a Volume, so this indicates a bug in the plugin and Nomad explicitly logs a warning asking for a plugin bug report.

Source

Thrown at client/csi_endpoint.go:217

		return fmt.Errorf("CSI.ControllerCreateVolume: %v", err)
	}

	ctx, cancelFn := c.requestContext()
	defer cancelFn()

	// CSI ControllerCreateVolume errors for timeout, codes.Unavailable and
	// codes.ResourceExhausted are retried; all other errors are fatal.
	cresp, err := plugin.ControllerCreateVolume(ctx, csiReq,
		grpc_retry.WithPerRetryTimeout(CSIPluginRequestTimeout),
		grpc_retry.WithMax(3),
		grpc_retry.WithBackoff(grpc_retry.BackoffExponential(100*time.Millisecond)))
	if err != nil {
		return fmt.Errorf("CSI.ControllerCreateVolume: %v", err)
	}

	if cresp == nil || cresp.Volume == nil {
		c.c.logger.Warn("plugin did not return error or volume; this is a bug in the plugin and should be reported to the plugin author")
		return fmt.Errorf("CSI.ControllerCreateVolume: plugin did not return error or volume")
	}
	resp.ExternalVolumeID = cresp.Volume.ExternalVolumeID
	resp.CapacityBytes = cresp.Volume.CapacityBytes
	resp.VolumeContext = cresp.Volume.VolumeContext

	// Note: we safely throw away cresp.Volume.ContentSource here
	// because it's just round-tripping the value set by the user in
	// the server RPC call

	resp.Topologies = make([]*nstructs.CSITopology, len(cresp.Volume.AccessibleTopology))
	for _, topo := range cresp.Volume.AccessibleTopology {
		resp.Topologies = append(resp.Topologies,
			&nstructs.CSITopology{Segments: topo.Segments})
	}

	return nil
}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Report the bug to the CSI plugin vendor/author with plugin version and logs, as Nomad's warning message instructs
  2. Upgrade or downgrade the CSI plugin to a version with correct CreateVolume response handling
  3. Check the plugin's own logs at the same timestamp for an internal error that was masked
  4. Work around by provisioning the volume through the storage provider's native tooling while the plugin bug is open
Defensive patterns

Strategy: try-catch

Validate before calling

// Ensure the plugin is a well-known, supported CSI implementation before use
// (verify plugin name/version via nomad plugin status or CSI GetPluginInfo out-of-band)

Try / catch

err := client.CreateVolume(req)
if err != nil && strings.Contains(err.Error(), "plugin did not return error or volume") {
    // This is a plugin protocol bug: collect plugin logs + version and report
    // to the plugin vendor; do not blind-retry, it will recur
    log.Errorw("CSI plugin returned empty CreateVolume response", "plugin", pluginID)
}

Prevention

When it happens

Trigger: plugin.ControllerCreateVolume returns (nil, nil) or a response whose .Volume field is nil — the plugin reported success but omitted the required Volume message in the csi.CreateVolumeResponse.

Common situations: Third-party CSI plugin bug (missing/incorrect response construction); plugin version regression after upgrade; plugin silently swallowing an internal error while returning an empty response.

Related errors


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