-
Notifications
You must be signed in to change notification settings - Fork 378
Error handling for Idempotency. #24
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
Comments
CreateVolume: It's arguable that in the interest of idempotency this RPC should return success if the volume has already been created. However, in such cases the CO may be interested in whether the volume already existed, or has been created from scratch. A plugin MAY NOT implement support for the ListVolumes RPC, and so in such cases it would seem difficult for a CO to reconcile its copy of DeleteVolume: the recovery behavior for ControllerPublishVolume: it's idempotent; multiple publish calls w/ the same ControllerUnpublishVolume: same as the comment for ControllerPublishVolume NodePublishVolume: it's idempotent, so in general I'd expect redundant calls w/ identical parameters to succeed NodeUnpublishVolume: same as the above comment for NodePublishVolume |
It seems to me that for idempotency, returning a success is simpler for CO, then I would suggest that we can remove |
IMO HTTP has a pretty nice pattern for this. Instead of treating redundant creation as an error, it treats it as a different kind of success. Create calls that actually create something return 201 CREATED whereas calls to create something that already exists return 200 OK. In general it strikes me that most of the error code discussions we are having are heading down the path of reinventing the basic CRUD and networking status codes that are baked into HTTP, but maybe now that the pendulum has swung fully back to RPC interfaces, that's heresy? |
@julian-hj grpc has the same kind of mechanisms, including an |
#160 has landed. can this be closed? |
nevermind, I'm just closing this. If that's controversial then please re-open |
CreateVolume: When a volume with the specified name exists, do we return a success or a
VOLUME_ALREADY_EXISTS
error? If the latter, should we add aVolumeInfo
inCreateVolumeError
?DeleteVolume: When the volume does not exist, do we return a success or a
VOLUME_DOES_NOT_EXIST
error?ControllerPublishVolume: When a volume is published to the same node, do we return a success or an error? If the latter, what error code should we use, and should we add a
PublishVolumeInfo
intoControllerPublishVolumeError
?ControllerUnpublishVolume: When a volume is already unpublished from the same node, do we return a success or an error? If the latter, what error code should we use?
NodePublishVolume: When a volume is publish to the same path, do we return a success or an error? If the latter, what error code should we use?
NodeUnpublishVolume: When a volume is unpublished from the same path, do we return a success or an error? If the latter, what error code should we use?
The text was updated successfully, but these errors were encountered: