-
Notifications
You must be signed in to change notification settings - Fork 46
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
fix(grpc): throw error on wrong gateway listener #154
Conversation
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.
I believe it is expected behaviour, intended for multigateway configuration. Note, we skip creating the local spkd listener but we store it in the omap state, so other gateway (with this name) could detect it and create.
I think an improvement that still could be implemented would be to check if the name matches one of the group gateways and throw error if it does not. But currently we don't have such a list of gateways available to check against it.
I think it's misleading for the grpc to return |
So, you propose just to disable a possibility to configure a listener for another gateway? Note, for a not listener case, when a spdk call should be executed on all gateways, if it succeeds on one spdk it does not guarantee it will succeed on all others. Also, after restart, when loading the stored state an spdk call may fail this time. |
AFAIR on one of the weekly meetings it was discussed that we would want this limitation (create/delete listener only with its "local" gateway) to avoid some corner cases. If I understood that correctly then this PR makes sense. @PepperJo can you confirm? |
Yes, after re-reading this PR, I think that this limitation does makes sense. I think that in the future we might want to reconsider it, to allow more ease of use when configuring multi GWs (so user doesn't need to do it separately for each GW), but for now it might be good. @PepperJo agree? |
@trociny @caroav Yes, I think this PR makes sense. For now I think this is the safest and easiest way to implement a "fix". |
Signed-off-by: Sandy Kaur <[email protected]>
b82d572
to
f5fd4ac
Compare
This PR adds an exception in cases of
create/delete_listener
where the gateway name is supplied along with traddr but the gateway name does not match the current gateway. Previously, no SPDK call would be made but the listener request would return successfully.Thanks to @pgerv12 and @SeanP-2023 for finding this issue.