[Gluster-users] error reporting and --xml

Nicolas Raynaud nraynaud+gluster at gmail.com
Thu Jul 20 12:51:01 UTC 2017


Hi all,

I am developing a gluster wrapper, and when using glusterfs-3.8.9-1 (on
centos) with --xml, timeout errors have two issues:
1) the message is on stdout
2) the message is not formatted in XML

I think the error is the use of cli_out() here:
https://github.com/gluster/glusterfs/blob/master/cli/src/cli-cmd.c#L293
since cli_out() bypasses all the XML formatting output and writes directly
to stdout.


Moreover, when a "peer probe --xml" failed, its opRet was still set to zero
and its error messsage was not in opErrstr:

<cliOutput>
  <opRet>0</opRet>
  <opErrno>2</opErrno>
  <opErrstr/>
  <output>Host 172.31.100.103 port 24007 already in peer list</output>
</cliOutput>


That makes for a quite inconsistent error handling in the wrapper.


Thanks,

Nicolas Raynaud.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170720/7a4eb6f0/attachment.html>


More information about the Gluster-users mailing list