[Pacemaker] [Openais] Unusual exit code with /etc/init.d/corosync stop
Andrew Beekhof
andrew at beekhof.net
Thu Mar 25 08:15:11 UTC 2010
On Tue, Mar 23, 2010 at 12:42 AM, Andreas Mock <Andreas.Mock at web.de> wrote:
> Hi all,
>
> I'm using corosync 1.2.0 from the packages of clusterlabs.org on openSuSE 11.2.
> A correct /etc/init.d/corosync stop issues a return code of 1
The rc code isn't coming from corosync at all.
Its coming from the last command in stop(), which is "echo".
Please run the following and report the result:
echo ; echo $?
On Fedora it produces:
[09:14 AM] root at f12 ~/tmp # echo ; echo $?
0
[09:14 AM] root at f12 ~/tmp #
> which definitely hurts
> the Cluster Test Suite when stopping the cluster stack asuming (IMHO correctly)
> that a problem free execution of the rc script should return 0 and not 1.
>
>
>
> The problem is indirectly the setting of the return code variable $rtrn in the while
>
> loop waiting for corosync to die. While loop is exited exactly when the status
>
> call delivers a 1 meaning that the process isn't there any more. This rc of 1
>
> will then be delivered as return code of the "stop"-call.
>
>
>
> Here's the patch just to show the little change.
>
> -----------------------8<--------------------------
>
> --- /etc/init.d/corosync 2010-01-20 21:23:53.000000000 +0100
> +++ /tmp/corosync 2010-03-23 00:25:12.794065102 +0100
> @@ -138,6 +138,7 @@
> ;;
> stop)
> stop
> + rtrn=0
> ;;
> *)
> echo "usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}"
> -----------------------8<--------------------------
>
>
>
> Best regards
>
> Andreas Mock
>
>
>
>
>
>
>
>
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais
More information about the Pacemaker
mailing list