[Gluster-devel] Chnage in exit codes of #gluster volume heal command

James purpleidea at gmail.com
Wed May 28 16:17:12 UTC 2014


On Wed, May 28, 2014 at 6:38 AM, Vikhyat Umrao <vumrao at redhat.com> wrote:
> Hi,
>
> Can we change the exit codes of #gluster volume heal command if fields like
> `to be healed`, `heal-failed` and `split-brain` have non zero values.
> It will help in a monitoring script to capture the heal details.
>
> Please let me know your inputs.
I have the same question Pranith has.

In addition, I would recommend considering using --xml and that
picking out the field you want to look at with a quick xml parser, and
then going with that directly. More stable than watching for a
specific return code.

An example of how to parse the xml can be found in:
https://github.com/purpleidea/puppet-gluster/blob/master/files/xml.py
(although there are surely other better ways too!)

HTH
James
>
> Thanks,
> Vikhyat


More information about the Gluster-devel mailing list