public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* STABLE2 - init.d/cman: use fence_tool -m for two node clusters
@ 2008-08-27 16:40 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2008-08-27 16:40 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7087a7d5e8c9601a9f405ee71befa3db90256481
Commit: 7087a7d5e8c9601a9f405ee71befa3db90256481
Parent: 41a69f04aeaf9aa3f38c899bf55495f04c19831c
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Aug 27 11:29:20 2008 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Aug 27 11:29:20 2008 -0500
init.d/cman: use fence_tool -m for two node clusters
bz 460190
Use the new fence_tool -m option in the cman init script for two node
clusters. This delays fence_tool join when both nodes aren't members.
The delay allows initial cluster partitions (due to badly configured
network/switches) to converge before starting fencing.
Signed-off-by: David Teigland <teigland@redhat.com>
---
cman/init.d/cman.in | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 7c86f82..b2106d3 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -57,6 +57,10 @@
# higher elsewhere it will not be reduced here.
[ -z "$NET_RMEM_MAX" ] && NET_RMEM_MAX=4194304
+# FENCED_MEMBER_DELAY -- amount of time to delay fence_tool join to allow
+# all nodes in cluster.conf to become cluster members. In seconds.
+[ -z "$FENCED_MEMBER_DELAY" ] && FENCED_MEMBER_DELAY=45
+
# FENCE_JOIN -- boolean value used to control whether or not this node
# should join the fence domain. If FENCE_JOIN is set to "no", then
# the script will not attempt to the fence domain. If FENCE_JOIN is
@@ -175,8 +179,16 @@ start_daemons()
start_fence()
{
- errmsg=$( /sbin/fence_tool -w -t $FENCED_START_TIMEOUT join \
- > /dev/null 2>&1 ) || return 1
+ /usr/sbin/cman_tool status | grep Flags | grep 2node &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ errmsg=$( /sbin/fence_tool -w -t $FENCED_START_TIMEOUT join \
+ > /dev/null 2>&1 ) || return 1
+ else
+ errmsg=$( /sbin/fence_tool -w -t $FENCED_START_TIMEOUT \
+ -m $FENCED_MEMBER_DELAY join \
+ > /dev/null 2>&1 ) || return 1
+ fi
return 0
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-27 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-27 16:40 STABLE2 - init.d/cman: use fence_tool -m for two node clusters 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).