{"record":{"id":"9eeefe6035edcb27","repo":"hashicorp/nomad","slug":"csi-controllercreatevolume-plugin-did-not-return","errorCode":null,"errorMessage":"CSI.ControllerCreateVolume: plugin did not return error or volume","messagePattern":"CSI\\.ControllerCreateVolume: plugin did not return error or volume","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/csi_endpoint.go","lineNumber":217,"sourceCode":"\t\treturn fmt.Errorf(\"CSI.ControllerCreateVolume: %v\", err)\n\t}\n\n\tctx, cancelFn := c.requestContext()\n\tdefer cancelFn()\n\n\t// CSI ControllerCreateVolume errors for timeout, codes.Unavailable and\n\t// codes.ResourceExhausted are retried; all other errors are fatal.\n\tcresp, err := plugin.ControllerCreateVolume(ctx, csiReq,\n\t\tgrpc_retry.WithPerRetryTimeout(CSIPluginRequestTimeout),\n\t\tgrpc_retry.WithMax(3),\n\t\tgrpc_retry.WithBackoff(grpc_retry.BackoffExponential(100*time.Millisecond)))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"CSI.ControllerCreateVolume: %v\", err)\n\t}\n\n\tif cresp == nil || cresp.Volume == nil {\n\t\tc.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\")\n\t\treturn fmt.Errorf(\"CSI.ControllerCreateVolume: plugin did not return error or volume\")\n\t}\n\tresp.ExternalVolumeID = cresp.Volume.ExternalVolumeID\n\tresp.CapacityBytes = cresp.Volume.CapacityBytes\n\tresp.VolumeContext = cresp.Volume.VolumeContext\n\n\t// Note: we safely throw away cresp.Volume.ContentSource here\n\t// because it's just round-tripping the value set by the user in\n\t// the server RPC call\n\n\tresp.Topologies = make([]*nstructs.CSITopology, len(cresp.Volume.AccessibleTopology))\n\tfor _, topo := range cresp.Volume.AccessibleTopology {\n\t\tresp.Topologies = append(resp.Topologies,\n\t\t\t&nstructs.CSITopology{Segments: topo.Segments})\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/csi_endpoint.go#L199-L235","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Report the bug to the CSI plugin vendor/author with plugin version and logs, as Nomad's warning message instructs","Upgrade or downgrade the CSI plugin to a version with correct CreateVolume response handling","Check the plugin's own logs at the same timestamp for an internal error that was masked","Work around by provisioning the volume through the storage provider's native tooling while the plugin bug is open"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Ensure the plugin is a well-known, supported CSI implementation before use\n// (verify plugin name/version via nomad plugin status or CSI GetPluginInfo out-of-band)","typeGuard":null,"tryCatchPattern":"err := client.CreateVolume(req)\nif err != nil && strings.Contains(err.Error(), \"plugin did not return error or volume\") {\n    // This is a plugin protocol bug: collect plugin logs + version and report\n    // to the plugin vendor; do not blind-retry, it will recur\n    log.Errorw(\"CSI plugin returned empty CreateVolume response\", \"plugin\", pluginID)\n}","preventionTips":["Use CSI plugins from the Nomad/CNCF verified list and keep them updated","Test volume create/expand lifecycle after every plugin upgrade","Watch Nomad client logs for the 'plugin did not return error or volume' warning and file vendor bugs early","Pin plugin versions; avoid untested community plugins in production"],"tags":["csi","plugin-protocol-violation","volume-provisioning","vendor-bug"],"backgroundTag":"csi-plugin-invalid-response","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}