[Pacemaker] Unusual exit code with /etc/init.d/corosync stop

Andreas Mock Andreas.Mock at web.de
Mon Mar 22 23:42:51 UTC 2010


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

 

 

 

 




More information about the Pacemaker mailing list