-
Notifications
You must be signed in to change notification settings - Fork 367
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
spec: Use ABORTED instead of UNIMPLEMENTED #151
Conversation
For the case where the CO is not supposed to call some RPCs, the plugin should return ABORTED to indicate that the CO may want to retry at a higher level (e.g., by calling `ControllerGetCapabilities` first).
Unimplemented looks like the correct code to me:
Aborted would indicate that given a change in state or the request the call could succeed. |
@cpuguy83 it's more a matter of recovery semantics.
With |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I can buy that argument. LGTM |
@cpuguy83 @julian-hj, do you have any further thoughts on this? |
I don't agree with the case. |
I agree with @cpuguy83. |
It should be unimplemented if the SP doesn’t implement something. Aborted should be used when RPCs in a known workflow are invoked out of order. For example, if NodePublishVolume is called before ControllerPublishVolume then the former could return aborted to indicate the device is not yet available on the node host and to attempt ControllerPublishVolume. |
Does anyone see value in avoiding overlap between error codes generated by
the grpc libs and the application-level error codes listed in the CSI spec?
…On Mon, Nov 20, 2017 at 1:24 PM, Schley Andrew Kutz < ***@***.***> wrote:
It should be unimplemented if the SP doesn’t implement something. Aborted
should be used when RPCs in a known workflow are invoked out of order. For
example, if NodePublishVolume is called before ControllerPublishVolume then
the former could return aborted to indicate the device is not yet available
on the node host and to attempt ControllerPublishVolume.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPVLO89kWKp0gE1Qbnmwq-0G8D5t17qks5s4cPJgaJpZM4QimA_>
.
|
Absolutely, and I thought that was the purpose of the gRPC error model change. I wasn’t arguing to use an app specific code. I thought we were debating when it makes sense to use unimplemented vs aborted. |
@jdef : in this case, my feeling is that there isn't a great deal of benefit in making that distinction. Basically, if the CO is coded correctly, and the plugin is operating as advertised, we should never see UNIMPLEMENTED. So, if we see it, that means that we need to go digging in the logs to figure out whether SP or the CO is to blame. That would be true regardless of whether the error is generated by the SP or the gRPC layer. |
I agree with Julian. Take GetNodeID for example - while it’s optional, that state is tied to the ControllerCapability PublishUnpublish. IMO there are too many concerns regarding examining capabilities to ascertain the workflows supported by an SP. If there should only be one or two supported models then let’s abandon capabilities and replace it with something simpler. Otherwise let’s acknowledge that a COs responsibility is to query the SP’s capabilities to figure out the names and order of RPCs to invoke. If an SP returns UNIMPLEMETED at that point then the SP is invalid anyway. |
this should be rebased and take into account #152 |
For the case where the CO is not supposed to call some RPCs, the plugin
should return ABORTED to indicate that the CO may want to retry at a
higher level (e.g., by calling
ControllerGetCapabilities
first).xref #115