<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 21 April 2015 at 17:47, Avra Sengupta <span dir="ltr">&lt;<a href="mailto:asengupt@redhat.com" target="_blank">asengupt@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Today whenever a gluster command fails the ret code is always 1. Irrespective of the failure. I have sent the following patch which takes a first step towards bringing some order to this chaos.<br>
<a href="http://review.gluster.org/10313" target="_blank">http://review.gluster.org/10313</a><br>
<br>
It addresses the following scenarios:<br>
<br>
1. Invalid Syntax: I have incorporated this for the snapshot commands only for now. In case of an invalid syntax the retcode will be 2.<br>
2. Another transaction in progress errors: In case the command fails to acquire a lock, because another transaction is in progress the retcode will be 3.<br>
<br>
If the approach is fine, and it&#39;s fine to go with such incremental retcodes, then once this patch gets accepted, I will send further patches on top of this one. I would also urge other component owners to block retcodes for their components in &quot;glusterd-errno.h&quot;, and start doing the same.<br></blockquote><div><br>+1. This even helps a great deal in automation, especially the &quot;another transaction is progress&quot;<br><br></div><div>Best Regards,<br></div><div>Vishwanath<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Avra<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br></div></div>