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

Hudson commented on HDDS-1068:
------------------------------

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #15967 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/15967/])
HDDS-1068. Improve the error propagation for ozone sh. Contributed by 
(aengineer: rev 0395f22145d90d38895a7a3e220a15718b1e2399)
* (edit) 
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/ObjectStore.java
* (edit) 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
* (edit) 
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java
* (edit) 
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java
* (delete) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rest/TestOzoneRestClient.java
* (delete) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rest/package-info.java
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
* (edit) 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/exceptions/OMException.java
* (edit) 
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
* (edit) 
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/ObjectStoreStub.java
* (edit) hadoop-ozone/common/src/main/proto/OzoneManagerProtocol.proto
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/web/client/TestVolumeRatis.java
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/Shell.java
* (edit) 
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestBucketManagerImpl.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmAcls.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManager.java
* (edit) 
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java
* (edit) 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/protocolPB/ScmBlockLocationProtocolClientSideTranslatorPB.java
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java
* (edit) 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/S3BucketManagerImpl.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/web/client/TestVolume.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
* (add) 
hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/om/exceptions/TestResultCodes.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/OzoneTestUtils.java
* (edit) 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/VolumeManagerImpl.java
* (edit) 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java


> Improve the error propagation for ozone sh
> ------------------------------------------
>
>                 Key: HDDS-1068
>                 URL: https://issues.apache.org/jira/browse/HDDS-1068
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: Ozone Manager
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.4.0
>
>         Attachments: HDDS-1068.001.patch, HDDS-1068.002.patch, 
> HDDS-1068.003.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> As of now the server side (om, scm) errors are not propagated to the client.
> For example if ozone is started with one single datanode:
> {code}
> docker-compose exec ozoneManager ozone sh key  put -r THREE 
> /vol1/bucket1/test2 NOTICE.txt             
> Create key failed, error:KEY_ALLOCATION_ERROR
> {code}
> There is no information here about the missing datanodes, or missing 
> pipelines.
> There are multiple problems which should be fixed:
> 1. type safety
> In ScmBlockLocationProtocolClientSideTranslatorPB the server (om) side 
> exceptions are transformed to IOException where the original status is added 
> to the message: 
> For example:
> {code}
>  throw new IOException("Volume quota change failed, error:" + 
> resp.getStatus());
> {code}
> In s3 gateway it's very hard to handle the different errors in a proper way. 
> The current code:
> {code}
> if (!ex.getMessage().contains("KEY_NOT_FOUND")) {
>             result.addError(
>                 new Error(keyToDelete.getKey(), "InternalError",
>                     ex.getMessage()));
> {code}
> 2. message
> The exception message is not propagated in the om response just the status 
> code
> 3. status code and error message are handled in a different way
> To propagate error code and status code to the client we need to handle them 
> in the same way.  But the Status field is part of the specific response 
> objects (CreateVolumeRequest) and not the OMRequest. I propose to put both 
> StatusCode and error message to the OMRequest.
> 4. The status codes in OzoneManagerProtocol.proto/Status enum is not in sync 
> with OmException.ResultCodes.
> It would be easy to use the same strings for both enums. With a unit test we 
> can ensure that they have the same names in the same order.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to