Skip to content

spec: ListVolumes-specific error types/codes needed #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
akutz opened this issue Jun 24, 2017 · 2 comments
Closed

spec: ListVolumes-specific error types/codes needed #52

akutz opened this issue Jun 24, 2017 · 2 comments
Assignees

Comments

@akutz
Copy link
Contributor

akutz commented Jun 24, 2017

There is no ListVolumesError message and so currently the only way to return error information from the RPC call Controller.ListVolumes is to use a GeneralError message:

  message GeneralError {
    enum GeneralErrorCode {
      // Default value for backwards compatibility. SHOULD NOT be
      // returned by Plugins. However, if a Plugin returns a
      // `GeneralErrorCode` code that an older CSI client is not aware
      // of, the client will see this code (the default fallback).
      //
      // Recovery behavior: Caller SHOULD consider updating CSI client
      // to match Plugin CSI version.
      UNKNOWN = 0;

      // Indicates that an undefined error occurred. More human-readable
      // information MAY be provided in the `error_description` field.
      // The `caller_must_not_retry` field MUST be set appropriately by
      // the Plugin to provide callers expected recovery behavior.
      //
      // Recovery behavior: Caller MAY retry (with exponential backoff),
      // if `caller_must_not_retry` is set to false. Otherwise, the
      // caller MUST not reissue the same request.
      UNDEFINED = 1;

      // Indicates that the version specified in the request is not
      // supported by the Plugin. The `caller_must_not_retry` field MUST
      // be set to true.
      //
      // Recovery behavior: Caller MUST NOT retry; caller SHOULD call
      // `GetPluginInfo` to discover which CSI versions the Plugin
      // supports.
      UNSUPPORTED_REQUEST_VERSION = 2;

      // Indicates that a required field is missing from the request.
      // More human-readable information MAY be provided in the
      // `error_description` field. The `caller_must_not_retry` field
      // MUST be set to true.
      //
      // Recovery behavior: Caller MUST fix the request by adding the
      // missing required field before retrying.
      MISSING_REQUIRED_FIELD = 3;
    }

The above error codes do not provide a meaningful response to the following Controller.ListVolumes error cases:

  • The starting_token value may be invalid.
  • If max_entries is greater than zero then a plug-in may need to return an error to indicate that it does not support pagination.
@chhsia0
Copy link
Contributor

chhsia0 commented Oct 6, 2017

We should also have a CALL_NOT_IMPLEMENTED error code for plugins without the RPC::LIST_VOLUMES and RPC::GET_CAPACITY capabilities.

@jdef
Copy link
Member

jdef commented Dec 19, 2017

pretty sure these concerns are addressed by #115. please re-open if needed

@jdef jdef closed this as completed Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants