Re: Returning right ret codes in case of failure of a glusterd command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 21 April 2015 at 17:47, Avra Sengupta <asengupt@xxxxxxxxxx> wrote:
Hi,

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.
http://review.gluster.org/10313

It addresses the following scenarios:

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.
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.

If the approach is fine, and it'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 "glusterd-errno.h", and start doing the same.

+1. This even helps a great deal in automation, especially the "another transaction is progress"

Best Regards,
Vishwanath


Regards,
Avra
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux