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/30 18:11:08 UTC

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

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