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:
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:
In s3 gateway it's very hard to handle the different errors in a proper way. The current code:
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.