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

ASF GitHub Bot logged work on HDDS-1068:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Feb/19 08:50
            Start Date: 15/Feb/19 08:50
    Worklog Time Spent: 10m 
      Work Description: elek commented on pull request #481: HDDS-1068. Improve 
the error propagation for ozone sh.
URL: https://github.com/apache/hadoop/pull/481
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 199122)
    Time Spent: 20m  (was: 10m)

> 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: 20m
>  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