You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Aravindan Vijayan (Jira)" <ji...@apache.org> on 2021/05/27 21:29:00 UTC

[jira] [Commented] (HDDS-5279) OFS mkdir -p does not work when Volume is not pre-created.

    [ https://issues.apache.org/jira/browse/HDDS-5279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352767#comment-17352767 ] 

Aravindan Vijayan commented on HDDS-5279:
-----------------------------------------

In the ‘BasicRootedOzoneClientAdapterImpl’, the code assumes a BUCKET_NOT_FOUND error while doing a getBucketDetails call to OM even if Volume is not found. 
    OzoneBucket bucket;
    try {
      bucket = proxy.getBucketDetails(volumeStr, bucketStr);
    } catch (OMException ex) {
      // Note: always create bucket if volumeStr matches "tmp" so -put works
      if (createIfNotExist) {
        // Note: getBucketDetails always throws BUCKET_NOT_FOUND, even if
        // the volume doesn't exist.
        if (ex.getResult().equals(BUCKET_NOT_FOUND)) {
          OzoneVolume volume;
          try {
            volume = proxy.getVolumeDetails(volumeStr);
{code}

This is no longer true after HDDS-4088 which added a getVolumeOwner check in the ACL check flow that looks up the volume info. This throws a VOLUME_NOT_FOUND error, and the code does not handle it.

> OFS mkdir -p does not work when Volume is not pre-created.
> ----------------------------------------------------------
>
>                 Key: HDDS-5279
>                 URL: https://issues.apache.org/jira/browse/HDDS-5279
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: OFS
>    Affects Versions: 1.1.0
>            Reporter: Aravindan Vijayan
>            Priority: Critical
>             Fix For: 1.2.0
>
>
> {code}
> ozone fs -mkdir -p ofs://ozone1/tgtvol/tgtbuck/passwd
> {code}
> {code}
> 21/05/27 17:57:12 DEBUG shell.Command: mkdir failure
> VOLUME_NOT_FOUND org.apache.hadoop.ozone.om.exceptions.OMException: Volume tgtvol is not found
> 	at org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.handleError(OzoneManagerProtocolClientSideTranslatorPB.java:604)
> 	at org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.getBucketInfo(OzoneManagerProtocolClientSideTranslatorPB.java:474)
> 	at org.apache.hadoop.ozone.client.rpc.RpcClient.getBucketDetails(RpcClient.java:615)
> 	at org.apache.hadoop.fs.ozone.BasicRootedOzoneClientAdapterImpl.getBucket(BasicRootedOzoneClientAdapterImpl.java:268)
> 	at org.apache.hadoop.fs.ozone.BasicRootedOzoneClientAdapterImpl.getBucket(BasicRootedOzoneClientAdapterImpl.java:204)
> 	at org.apache.hadoop.fs.ozone.BasicRootedOzoneClientAdapterImpl.createDirectory(BasicRootedOzoneClientAdapterImpl.java:420)
> 	at org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.mkdir(BasicRootedOzoneFileSystem.java:711)
> 	at org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.mkdirs(BasicRootedOzoneFileSystem.java:722)
> 	at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:2376)
> 	at org.apache.hadoop.fs.shell.Mkdir.processNonexistentPath(Mkdir.java:87)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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