{"record":{"id":"f4b300a9c1395694","repo":"hashicorp/nomad","slug":"controller-list-snapshots-v","errorCode":null,"errorMessage":"controller list snapshots: %v","messagePattern":"controller list snapshots: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/client_csi_endpoint.go","lineNumber":168,"sourceCode":"\t\t\"ClientCSI.ControllerDeleteSnapshot\",\n\t\tstructs.RateMetricWrite,\n\t\targs, reply)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"controller delete snapshot: %v\", err)\n\t}\n\treturn nil\n}\n\nfunc (a *ClientCSI) ControllerListSnapshots(args *cstructs.ClientCSIControllerListSnapshotsRequest, reply *cstructs.ClientCSIControllerListSnapshotsResponse) error {\n\tdefer metrics.MeasureSince([]string{\"nomad\", \"client_csi_controller\", \"list_snapshots\"}, time.Now())\n\n\terr := a.sendCSIControllerRPC(args.PluginID,\n\t\t\"CSI.ControllerListSnapshots\",\n\t\t\"ClientCSI.ControllerListSnapshots\",\n\t\tstructs.RateMetricList,\n\t\targs, reply)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"controller list snapshots: %v\", err)\n\t}\n\treturn nil\n}\n\nfunc (a *ClientCSI) sendCSIControllerRPC(pluginID, method, fwdMethod, op string, args cstructs.CSIControllerRequest, reply any) error {\n\n\t// client requests aren't RequestWithIdentity, so we use a placeholder here\n\t// to populate the identity data for metrics\n\tidentityReq := &structs.GenericRequest{}\n\n\taclObj, err := a.srv.AuthenticateServerOnly(a.ctx, identityReq)\n\ta.srv.MeasureRPCRate(\"client_csi\", op, identityReq)\n\n\tif err != nil || !aclObj.AllowServerOp() {\n\t\treturn structs.ErrPermissionDenied\n\t}\n\n\tclientIDs, err := a.clientIDsForController(pluginID)","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/client_csi_endpoint.go#L150-L186","documentation":"Nomad's ClientCSI.ControllerListSnapshots forwards a CSI.ControllerListSnapshots RPC to a controller plugin via sendCSIControllerRPC, wrapping failures as 'controller list snapshots: %v'. Nomad could not enumerate snapshots from the storage backend through the plugin.","triggerScenarios":"Calling ControllerListSnapshots (e.g. `nomad volume snapshots`) when the controller plugin has no healthy instances, the client connection is broken, or the driver's ListSnapshots call fails (pagination/backend error).","commonSituations":"Plugin not running or still starting; backend credentials revoked so the driver can't list; driver does not support LIST_SNAPSHOTS capability; network partition.","solutions":["Check `nomad plugin status <pluginID>` for a healthy controller and start/restart its job.","Confirm the driver supports listing snapshots (CSI LIST_SNAPSHOTS capability).","Verify backend credentials/permissions in the plugin job's secrets.","Read the wrapped root cause in server logs and fix connectivity or plugin errors."],"exampleFix":"# before: listing snapshots while controller is down\nnomad volume snapshots -plugin aws-ebs-controller   # fails\n# after\nnomad job run aws-ebs-csi-controller.nomad.hcl\nnomad plugin status aws-ebs-controller && nomad volume snapshots -plugin aws-ebs-controller","handlingStrategy":"retry","validationCode":"// ensure driver supports listing and controller is healthy\nif p.ControllersHealthy == 0 { return fmt.Errorf(\"no healthy controller for listing snapshots\") }","typeGuard":"func supportsListSnapshots(caps []string) bool {\n    for _, c := range caps { if c == \"LIST_SNAPSHOTS\" { return true } }\n    return false\n}","tryCatchPattern":"err := csi.ControllerListSnapshots(args, reply)\nif err != nil {\n    if strings.Contains(err.Error(), \"controller list snapshots:\") {\n        // retry after checking plugin health; cap retries\n    }\n    return err\n}","preventionTips":["Confirm the CSI driver advertises LIST_SNAPSHOTS capability.","Ensure backend credentials are valid for listing.","Retry with backoff around plugin restarts.","Verify plugin_id passed to `-plugin` matches a registered plugin."],"tags":["csi","nomad","snapshot","rpc-forwarding"],"backgroundTag":"csi-controller-unavailable","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}