[Engine-devel] IMP: Regarding an issue while translating the error messages for gluster using ErrorTranslator class

Shubhendu Tripathi shtripat at redhat.com
Wed Nov 6 10:07:34 UTC 2013


Hi,

In the case of Gluster, as there are no one to one mappings available 
for all the error messages from Gluster, we set the error in the 
VdcFault object as NULL.
We also populate the actual error from the Gluster as error message in 
the fault object.

/getReturnValue().getExecuteFailedMessages().add(error);//
//getReturnValue().getFault().setMessage(error);//
//getReturnValue().getFault().setError(null);/

Because of above settings and the below code snippet in /Frontend.java/ 
class the error message as is gets displayed on the error dialog -
/
//public String translateVdcFault(final VdcFault fault) {//
//        return 
getVdsmErrorsTranslator().TranslateErrorTextSingle(fault.getError() == 
null//
//                ? fault.getMessage() : fault.getError().toString());//
//}//
/
Well and good till now !!

But while translation of the error messages, all the occurrences of "." 
get replaced with "_".
This causes an issue for the gluster errors. If the error message sent 
from gluster has "."s (say IP Address of a host or FQDN for a host), 
that also gets replaced with "_" and the error message does not look 
correct.

Request your suggestion for handling such a case.

*PS: *One thing I can think of is, introducing a flag called 
/isExternalError/ in /VdcFault/ class to identify if the source of the 
fault is external. From Gluster we would set the flag as /true/, and 
while replacement of "." with "_", if the flag is set it will not do the 
replacements.

Regards,
Shubhendu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/engine-devel/attachments/20131106/20bf2701/attachment.html>


More information about the Engine-devel mailing list