public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - init.d/cman: unfence local node
@ 2009-02-27 16:21 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-02-27 16:21 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5ff28e4a8eb1857e0d708f2dbd805a3fc4197512
Commit: 5ff28e4a8eb1857e0d708f2dbd805a3fc4197512
Parent: 7e9d9b28e9b0d45c1786b7b39fdd4f7351a212be
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:18:17 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 9114adc..3aa214a 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -204,6 +204,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()
{
@@ -466,6 +485,12 @@ start()
return 1
fi
+ unfence_self
+ if [ $? -eq 1 ]
+ then
+ return 1
+ fi
+
start_qdiskd
echo -n " Starting daemons... "
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-27 16:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-27 16:21 cluster: master - init.d/cman: unfence local node David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).