This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - init.d/cman: unfence local node
- From: David Teigland <teigland at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Fri, 27 Feb 2009 16:18:57 +0000 (UTC)
- Subject: cluster: STABLE3 - init.d/cman: unfence local node
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1e24efc0b7aea726791287bf01e18c4e35de4592
Commit: 1e24efc0b7aea726791287bf01e18c4e35de4592
Parent: 8c965b6011f82f0a889ed790fdb35df8e3593089
Author: David Teigland <teigland@redhat.com>
AuthorDate: Thu Feb 26 15:15:49 2009 -0600
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Fri Feb 27 10:16:01 2009 -0600
init.d/cman: unfence local node
Run fence_node -U after cman_tool join. This does nothing unless
unfencing is defined for the local node. If unfencing is defined
and the unfencing fails, it causes init.d/cman to fail.
Signed-off-by: David Teigland <teigland@redhat.com>
---
cman/init.d/cman.in | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 9303a0b..b8303cb 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -236,6 +236,25 @@ start_cman()
return 0
}
+unfence_self()
+{
+ fence_node -U > /dev/null 2>&1
+ error=$?
+
+ if [ $error -eq 0 ]
+ then
+ echo " Unfencing self... done"
+ return 0
+ else
+ if [ $error -eq 1 ]
+ then
+ echo " Unfencing self... failed"
+ return 1
+ else
+ return 0
+ fi
+ fi
+}
start_qdiskd()
{
@@ -502,6 +521,12 @@ start()
return 1
fi
+ unfence_self
+ if [ $? -eq 1 ]
+ then
+ return 1
+ fi
+
start_qdiskd
echo -n " Starting daemons... "