-
Notifications
You must be signed in to change notification settings - Fork 378
Reconcile idempotency requirements with VOLUME_DOES_NOT_EXIST
and VOLUME_ALREADY_EXISTS
error codes
#100
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
related to #18 If we continue to require the error to be returned, then I think we need to change the way errors are returned, as the current spec doesn't allow an error and a response message at the same time. I'm pretty sure we were gonna do that anyway, but it's worth tracking in this context. |
Hi @julian-hj,
Are you sure? My work on GoCSI returns both an error code and message. Every CSI error has an error code and associated description string that can be set to whatever you wish. |
@akutz yeah sure, but we don't just want an error string. For the create call to be idempotent, it needs to return a full Result including VolumeInfo. It cannot do that and also return an Error because we use
|
Hi @julian-hj, Oh, I misunderstood you then. Yeah, I think you just restated the crux of the issue. Essentially the error codes negate idempotency. So either the error codes must be eliminated or moved into the result if you want the original value back. |
@akutz if we move to using grpc errors instead then this problem pretty much goes away. HTTP has the same pattern, in the sense that "idempotent" create calls might return different status codes on the first and second call ( |
Works for me :)
…--
-a
On Sep 6, 2017, at 1:57 PM, Julian Hjortshoj ***@***.***> wrote:
@akutz if we move to using grpc errors instead then this problem pretty much goes away. HTTP has the same pattern, in the sense that "idempotent" create calls might return different status codes on the first and second call (200 OK versus 201 CREATED)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yep, plan would would be to do this along with the move to gRPC error codes. |
Closed with #115 |
@akutz pointed out:
We debated offline weather we should remove the
VOLUME_DOES_NOT_EXIST
andVOLUME_ALREADY_EXISTS
error codes altogether and require the associated calls to succeed in these cases, or continue to require the error codes and clarify the idempotency clauses to indicate that while idempotency is expected, for these specific cases the plugin must return these error codes.We agreed that the later would is preferred because it improves debuggability. Knowing exactly what happened (even if the only thing CO does differently is logging) is better than having to guess what "actually happened" when things go wrong (for example, CO has a bug that somehow calls unpublish on the wrong volume, one that is not yet mounted). For consistency amongst the interfaces we will keep all instances of the
VOLUME_DOES_NOT_EXIST
andVOLUME_ALREADY_EXISTS
error codes, but will modify the idempotency clauses with clarifications to address the contradictions.This issue is to track that work.
CC @jdef @jieyu @akutz
The text was updated successfully, but these errors were encountered: