-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-3224. Enforce volume and bucket name rule at create time. #718
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
Conversation
|
cc: @ChenSammi / @bharatviswa504 for review. |
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
bharatviswa504
left a comment
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 have a few comments.
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. |
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. |
I reverted the changes. |
|
S3BucketCreateRequest checked for length but the verifyResourceName is more comprehensive. |
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.
+1 LGTM.
Retriggered CI to get a clean run.
|
@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. |
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? |
|
@ChenSammi wanted to get your input on above, thanks. |
dineshchitlangia
left a comment
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.
Changes look good @swagle , however, there are multiple acceptance test failures for OM HA and Freon. Could you please review that?
@dineshchitlangia The same test seems to fail every time: ozone-om-ha-s3, I see HDDS-3313 is opened to address this. |
|
OM bucket generator fails even in single OM environment: due to: Can fix it by converting random Freon prefix to lowercase: |
I am actually getting this failure on |
Thanks @adoroszlai got the acceptance to pass finally! |
dineshchitlangia
left a comment
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.
+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.