Uh oh!
There was an error while loading. Please reload this page.
HDDS-3224. Enforce volume and bucket name rule at create time. - #718
Conversation
swagle
commented
Mar 24, 2020
cc: @ChenSammi / @bharatviswa504 for review. |
Uh oh!
There was an error while loading. Please reload this page.
bharatviswa504
left a comment
There was a problem hiding this comment.
I have a few comments.
swagle
commented
Mar 25, 2020
Thanks, Bharat for your comments. I will make those changes requested but one point, like Sammi pointed out in the Jira, this code path is still possible. |
bharatviswa504
commented
Mar 25, 2020
When using clientsideTranslatorPB, it will reach to OzoneManagerProtocolServerSideTranslator and then it will use new request code. I see only way, old code can be used is by using direct OzoneManager instance, but I see no real use case in doing that. |
swagle
commented
Mar 25, 2020
I reverted the changes. |
swagle
commented
Mar 27, 2020
S3BucketCreateRequest checked for length but the verifyResourceName is more comprehensive. |
ChenSammi
commented
Mar 30, 2020
@swagle, thanks for working on the fix. I tried the patch locally with non-HA OM. A volume with name "11" still can be created using Nanda's tool. The volume and bucket name check is in RpcClient.java while Nanda's tool use OzoneManagerProtocolClientSideTranslatorPB directly which bypass the check. Can we move these checks to server side as HDFS does? so that we just need one place to verify volume and bucket name integrity. |
swagle
commented
Mar 30, 2020
Hi Sammy, that is correct, it would be possible since I modified the patch based on @bharatviswa504 comments. Do you know where is the source for the tool? |
Actually, I am not able to verify by writing simple test, it fails as expected:
Above failed with exception: Could it be something not updated in your test setup? |
swagle
commented
Mar 31, 2020
@ChenSammi wanted to get your input on above, thanks. |
dineshchitlangia
left a comment
There was a problem hiding this comment.
Changes look good @swagle , however, there are multiple acceptance test failures for OM HA and Freon. Could you please review that?
swagle
commented
Apr 1, 2020
@dineshchitlangia The same test seems to fail every time: ozone-om-ha-s3, I see HDDS-3313 is opened to address this. |
adoroszlai
commented
Apr 1, 2020
adoroszlai
commented
Apr 1, 2020
OM bucket generator fails even in single OM environment: due to: Can fix it by converting random Freon prefix to lowercase: |
swagle
commented
Apr 1, 2020
I am actually getting this failure on |
swagle
commented
Apr 1, 2020
Thanks @adoroszlai got the acceptance to pass finally! |
dineshchitlangia
left a comment
There was a problem hiding this comment.
+1 @swagle , we now have a clean green run :)
Thank you @adoroszlai , @elek , @bharatviswa504, @ChenSammi for chiming in.
What changes were proposed in this pull request?
Validations performed by RpcClient are not done when using OzoneManager client directly. Added resource name checks for volume and bucket.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3224
How was this patch tested?
Added an integration test.