-
Notifications
You must be signed in to change notification settings - Fork 45
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
control/cli: add ip requirement for listener #128
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 think changing just CLI part is not enough. We need to make sure the gateway has this requirement too. Theoretically one may talk to the gateway directly, not using cli. On the cli side it is needed just to catch an invalid input earlier and provide more meaningful error message.
3e9effb
to
bef4abe
Compare
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.
You also need to update tests/test_cli.py.
And although the gateway and the address are required on cli part, it seems like we don't have any check the gateway name is not empty on the server side and the server may store omap with empty gateway name, which will never be used. This may be out of scope of this PR though, because we also do not check that the gateway name is valid (belongs to an existing gateway), so we may store omap with invalid names, which will never be used too, and this does not differ much from storing omap with the empty name.
bef4abe
to
4725d2a
Compare
updated
gateway name can not be empty on server side. If gateway name is empty in conf, it will be assigned a value of hostname. Line 44 in e783513
|
I mean the empty gateway name in the request. If such a requests comes to the gateway it will store it in omap (although it will not be used). |
b893ed8
to
52c1d3e
Compare
Get your point. So I moved the judgment of |
But there is still a problem with this. The error information will be output to the server's gateway daemon, and the client can only receive an error message and cannot know why it went wrong. If this method is possible, is there a better way to report errors. error on server side:
client side:
|
52c1d3e
to
0499879
Compare
0499879
to
6b00c3d
Compare
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.
Thank you @CongMinYin LGTM
@CongMinYin This needs to be rebased. |
f77bbec
to
e5dd2a6
Compare
Hello everyone, rebased. could you please help check it. |
fac36f6
to
8cfaed5
Compare
discovert controller need a specific ip/port. fixes: ceph#87 Signed-off-by: Yin Congmin <[email protected]>
8cfaed5
to
585c66c
Compare
@CongMinYin I believe that this PR can be merged. Why do you think that there is an issue? The testing pass. For a single GW I see no issues. |
Hi, it's about automated demo testing considerations. I added a variable to define the |
@CongMinYin how are you? It is reasonable to assume that the tests would need to be updated as the codebase evolves, to keep them in sync. WDYT? |
It's not about the testing server but about what It would be more reliable to define gateway names in |
I think its OK to merge it @CongMinYin. I think that in general we might have another issue as discussed in #154, but this is not related to this PR. |
discovert controller need a specific ip/port.
fixes: #87