You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/03/24 21:16:24 UTC

[GitHub] [hadoop-ozone] swagle opened a new pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

swagle opened a new pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718
 
 
   ## 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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle closed pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle closed pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-607397247
 
 
   > 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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-606121259
 
 
   > > @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:
   
   `@Test
     public void testInvalidVolumeBucketNamesThrowException() throws Exception {
       OmVolumeArgs volumeArgs = OmVolumeArgs.newBuilder()
           .setVolume("v1")
           .setOwnerName("owner1")
           .setAdminName("admin1")
           .build();
       RPC.setProtocolEngine(conf, OzoneManagerProtocolPB.class,
           ProtobufRpcEngine.class);
       OzoneManagerProtocol client =
           new OzoneManagerProtocolClientSideTranslatorPB(
           RPC.getProxy(OzoneManagerProtocolPB.class,
               RPC.getProtocolVersion(OzoneManagerProtocolPB.class),
               OmUtils.getOmAddressForClients(conf),
               UserGroupInformation.getCurrentUser(), conf,
               NetUtils.getDefaultSocketFactory(conf),
               Client.getRpcTimeout(conf)),
           "Ozone Manager Perf Test");
       client.createVolume(volumeArgs);
     }`
   
   Above failed with exception:
   `INVALID_VOLUME_NAME org.apache.hadoop.ozone.om.exceptions.OMException: Invalid volume name: v1`
   
   Could it be something not updated I your test setup?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-604776938
 
 
   S3BucketCreateRequest checked for length but the verifyResourceName is more comprehensive.
   We are still doing length check in S3BucketDeleteRequest, technically we should not need validation in the delete path but kept those changes asis.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle opened a new pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle opened a new pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718
 
 
   ## 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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-606100247
 
 
   > @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?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#discussion_r397484390
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -1894,10 +1896,12 @@ private void checkAdmin() throws OMException {
   @Override
   public void createBucket(OmBucketInfo bucketInfo) throws IOException {
     try {
-      if(isAclEnabled) {
+      if (isAclEnabled) {
         checkAcls(ResourceType.VOLUME, StoreType.OZONE, ACLType.CREATE,
             bucketInfo.getVolumeName(), bucketInfo.getBucketName(), null);
       }
+      HddsClientUtils.verifyResourceName(bucketInfo.getVolumeName(),
 
 Review comment:
   And if illegal, verifyResourceName throws IllegalArgumentException, here we need to catch this, and return proper error code to the client here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#discussion_r397613365
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -1894,10 +1896,12 @@ private void checkAdmin() throws OMException {
   @Override
   public void createBucket(OmBucketInfo bucketInfo) throws IOException {
     try {
-      if(isAclEnabled) {
+      if (isAclEnabled) {
         checkAcls(ResourceType.VOLUME, StoreType.OZONE, ACLType.CREATE,
             bucketInfo.getVolumeName(), bucketInfo.getBucketName(), null);
       }
+      HddsClientUtils.verifyResourceName(bucketInfo.getVolumeName(),
 
 Review comment:
   Added the checks at suggested sites.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-606749174
 
 
   @ChenSammi wanted to get your input on above, thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] dineshchitlangia merged pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
dineshchitlangia merged pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-604141630
 
 
   > > > 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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-603509830
 
 
   cc: @ChenSammi / @bharatviswa504 for review.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-607420879
 
 
   > HDDS-2934
   
   I am actually getting this failure on 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-603574378
 
 
   > 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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] ChenSammi commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
ChenSammi commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-605874573
 
 
   @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. 
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle edited a comment on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle edited a comment on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-606121259
 
 
   > > @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:
   
   `@Test
     public void testInvalidVolumeBucketNamesThrowException() throws Exception {
       OmVolumeArgs volumeArgs = OmVolumeArgs.newBuilder()
           .setVolume("v1")
           .setOwnerName("owner1")
           .setAdminName("admin1")
           .build();
       RPC.setProtocolEngine(conf, OzoneManagerProtocolPB.class,
           ProtobufRpcEngine.class);
       OzoneManagerProtocol client =
           new OzoneManagerProtocolClientSideTranslatorPB(
           RPC.getProxy(OzoneManagerProtocolPB.class,
               RPC.getProtocolVersion(OzoneManagerProtocolPB.class),
               OmUtils.getOmAddressForClients(conf),
               UserGroupInformation.getCurrentUser(), conf,
               NetUtils.getDefaultSocketFactory(conf),
               Client.getRpcTimeout(conf)),
           "Ozone Manager Perf Test");
       client.createVolume(volumeArgs);
     }`
   
   Above failed with exception:
   `INVALID_VOLUME_NAME org.apache.hadoop.ozone.om.exceptions.OMException: Invalid volume name: v1`
   
   Could it be something not updated in your test setup?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] adoroszlai commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-607418093
 
 
   OM bucket generator fails even in single OM environment:
   
   ```
   Freon OM Bucket Generator                                             | FAIL |
   255 != 0
   ```
   
   due to:
   
   ```
   OMException: Invalid bucket name: ELAtCj6bFe7
   ```
   
   Can fix it by converting random Freon prefix to lowercase:
   
   https://github.com/apache/hadoop-ozone/blob/61b6be001b78d1f3902db4a3a40734c19a90459c/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/BaseFreonGenerator.java#L240

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#discussion_r397482089
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -1894,10 +1896,12 @@ private void checkAdmin() throws OMException {
   @Override
   public void createBucket(OmBucketInfo bucketInfo) throws IOException {
     try {
-      if(isAclEnabled) {
+      if (isAclEnabled) {
         checkAcls(ResourceType.VOLUME, StoreType.OZONE, ACLType.CREATE,
             bucketInfo.getVolumeName(), bucketInfo.getBucketName(), null);
       }
+      HddsClientUtils.verifyResourceName(bucketInfo.getVolumeName(),
 
 Review comment:
   For write requests, this code is no more used.
   These changes need to bbe done in OMBucketcreateRequest#preExecute and OMVolumeCreateRequest#preExecute and the same thing needs to be done in S3BucketCreateRequest

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#discussion_r397482089
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -1894,10 +1896,12 @@ private void checkAdmin() throws OMException {
   @Override
   public void createBucket(OmBucketInfo bucketInfo) throws IOException {
     try {
-      if(isAclEnabled) {
+      if (isAclEnabled) {
         checkAcls(ResourceType.VOLUME, StoreType.OZONE, ACLType.CREATE,
             bucketInfo.getVolumeName(), bucketInfo.getBucketName(), null);
       }
+      HddsClientUtils.verifyResourceName(bucketInfo.getVolumeName(),
 
 Review comment:
   For write requests, this code is no more used.
   These changes need to be done in OMBucketcreateRequest#preExecute and OMVolumeCreateRequest#preExecute and the same thing needs to be done in S3BucketCreateRequest

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] bharatviswa504 commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-604138297
 
 
   > > 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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] adoroszlai commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-607404123
 
 
   > The same test seems to fail every time: ozone-om-ha-s3, I see HDDS-3313 is opened to address this.
   
   HDDS-3313 is only about `ozone-om-ha` (enabled in #265 and now disabled in ce6ad30a3939e3b211c9eede197d240cf26e2391), not `ozone-om-ha-s3`.  The latter has an intermittent, but very rare failure, reported in HDDS-2934.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.

Posted by GitBox <gi...@apache.org>.
swagle commented on issue #718: HDDS-3224. Enforce volume and bucket name rule at create time.
URL: https://github.com/apache/hadoop-ozone/pull/718#issuecomment-607503154
 
 
   > OM bucket generator fails even in single OM environment:
   > 
   > ```
   > Freon OM Bucket Generator                                             | FAIL |
   > 255 != 0
   > ```
   > 
   > due to:
   > 
   > ```
   > OMException: Invalid bucket name: ELAtCj6bFe7
   > ```
   > 
   > Can fix it by converting random Freon prefix to lowercase:
   > 
   > https://github.com/apache/hadoop-ozone/blob/61b6be001b78d1f3902db4a3a40734c19a90459c/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/BaseFreonGenerator.java#L240
   
   
   Thanks @adoroszlai got the acceptance to pass finally!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org