[sheepdog] Exit status of node recovery
Hitoshi Mitake
mitake.hitoshi at gmail.com
Mon Aug 26 03:47:54 CEST 2013
At Fri, 23 Aug 2013 17:53:02 +0200,
Valerio Pachera wrote:
>
> Hi, I'm wondering if it could be good to have an exit status different
> from 0 when there's a recovery running.
>
> I wish to monitor if cluster is doing a recovery in nagios/icinga or
> another application.
>
> To get this info I have to "parse" the output of 'node recovery'
> instead of the exit status.
>
> lines=$(dog vdi recovery | wc -l)
> if [ lines -ne 2 ]; then
> echo "recovery is running"
> fi
>
> Instead of
>
> dog vdi recovery > /dev/null
> if [ $? -eq 1 ]; then
> echo "recovery is running"
> fi
>
> What do you think?
I think using 1 for indicating recovery state cannot be
implemented. Because 1 is used for expressing failure of command
execution. But other value which is not used in include/exits.h can be
used for this purpose (e.g. 6).
I agree with your proposal. But I'd like to hear opinions from other
users and developers. Because this would be an important change which
breaks existing wrappers of dog.
Thanks,
Hitoshi
More information about the sheepdog
mailing list