While playing with pingd for the updated howto on resources on different
networks
(http://www.clusterlabs.org/wiki/Pingd_with_resources_on_different_networks),
I found that the pingd attribute is not reset (set to 0) when pingd is
stopped by the pingd RA, but _is_ reset when killing pingd manually.
This is because the RA stops pingd with kill -9, which does not let it
execute the normal pingd shutdown procedure (which includes setting the
attribute to 0).

Patch is attached.

Regards
Dominik
exporting patch:
# HG changeset patch
# User Dominik Klein <d...@in-telegence.net>
# Date 1234950829 -3600
# Branch stable-1.0
# Node ID cd2554063547ac147f8dce5e2c5e11d9fbd0ed18
# Parent  bfdb142b7bb361c60d08c65af3cf5fb85b06cd22
RA: pingd. stop with kill instead kill -9 so pingd shuts down properly

diff -r bfdb142b7bb3 -r cd2554063547 extra/resources/pingd
--- a/extra/resources/pingd	Tue Feb 17 09:20:24 2009 +0100
+++ b/extra/resources/pingd	Wed Feb 18 10:53:49 2009 +0100
@@ -212,7 +212,7 @@
 	pid=`cat $OCF_RESKEY_pidfile`
     fi
     if [ ! -z $pid ]; then
-	kill -9 $pid
+	kill $pid
 	rc=$?
 
 	if [ $rc = 0 -o $rc = 1 ]; then
@@ -220,7 +220,7 @@
 	    exit $OCF_SUCCESS
 	fi
 
-	ocf_log err "Unexpected result from kill -9 $pid: $rc"
+	ocf_log err "Unexpected result from kill $pid: $rc"
 	exit $OCF_ERR_GENERIC
     fi
     exit $OCF_SUCCESS
_______________________________________________
Pacemaker mailing list
Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Reply via email to