This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
Cluster Project branch, RHEL5, updated. cmirror_1_1_15-179-g67f13d1
- From: rohara at sourceware dot org
- To: cluster-cvs at sources dot redhat dot com, cluster-devel at redhat dot com
- Date: 28 Jul 2008 15:37:56 -0000
- Subject: Cluster Project branch, RHEL5, updated. cmirror_1_1_15-179-g67f13d1
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".
http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=67f13d16f385f42165d0196917fcd7bb8c5b0a1d
The branch, RHEL5 has been updated
via 67f13d16f385f42165d0196917fcd7bb8c5b0a1d (commit)
from 50203b164f9d122b3d2312534587e1dcef9e3bb8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 67f13d16f385f42165d0196917fcd7bb8c5b0a1d
Author: Ryan O'Hara <rohara@redhat.com>
Date: Mon Jul 28 10:36:43 2008 -0500
cman: add option to init script to prevent joining the fence domain
New sysconfig variable FENCE_JOIN will control whether or not the
node joins the fence domain. This variable can be set to either
value "yes" or "no". When FENCE_JOIN is set to "no", the init script
will not attempt to join the fence domain. Any other value is
equivalant to "yes", in which case the init script will attempt to
join the fence domain. (BZ #455598)
-----------------------------------------------------------------------
Summary of changes:
cman/init.d/cman | 91 ++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 68 insertions(+), 23 deletions(-)
diff --git a/cman/init.d/cman b/cman/init.d/cman
index e138798..9a28a11 100755
--- a/cman/init.d/cman
+++ b/cman/init.d/cman
@@ -24,12 +24,11 @@
# startup quorum is needed by many other applications, so we may as
# well wait here. If CMAN_QUORUM_TIMEOUT is less than 1, quorum will
# be ignored.
-#CMAN_QUORUM_TIMEOUT=300
[ -z "$CMAN_QUORUM_TIMEOUT" ] && CMAN_QUORUM_TIMEOUT=0
# CMAN_SHUTDOWN_TIMEOUT -- amount of time to wait for cman to become a
# cluster member before calling cman_tool leave during shutdown.
-# default is 60 seconds
+# The default is 60 seconds
[ -z "$CMAN_SHUTDOWN_TIMEOUT" ] && CMAN_SHUTDOWN_TIMEOUT=60
# FENCED_START_TIMEOUT -- amount of time to wait for starting fenced
@@ -39,6 +38,14 @@
# wait indefinately for fenced to start.
[ -z "$FENCED_START_TIMEOUT" ] && FENCED_START_TIMEOUT=300
+# 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
+# set to "yes", then the script will attempt to join the fence domain.
+# If FENCE_JOIN is set to any other value, the default behavior is
+# to join the fence domain (equivalent to "yes").
+[ -z "$FENCE_JOIN" ] && FENCE_JOIN="yes"
+
[ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/subsys/cman"
[ -n "$CLUSTERNAME" ] && cman_join_opts="-c $CLUSTERNAME"
@@ -212,6 +219,14 @@ xend_bridged_net_start() {
fence_xvmd_enabled()
{
#
+ # Check the value of FENCE_JOIN.
+ # If FENCE_JOIN is set to "no", then we should disable fence_xvm.
+ #
+ if [ "$FENCE_JOIN" == "no" ]; then
+ return 1
+ fi
+
+ #
# Check for the 'xm' binary. If it's not here, we are not
# running on a machine capable of running xvmd.
#
@@ -230,6 +245,21 @@ fence_xvmd_enabled()
return 0
}
+fence_join_enabled()
+{
+ #
+ # Check the value of FENCE_JOIN.
+ # If FENCE_JOIN is set to "no", we will not attempt to join
+ # the fence domain. If FENCE_JOIN is set to any other value,
+ # we will attempt to join the fence domain (default).
+ #
+ if [ "$FENCE_JOIN" == "no" ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
start()
{
echo "Starting cluster: "
@@ -247,6 +277,7 @@ start()
return 1
fi
fi
+
echo -n " Loading modules... "
ulimit -c unlimited
load_modules
@@ -257,6 +288,7 @@ start()
echo "failed"
return 1
fi
+
echo -n " Mounting configfs... "
start_configfs
if [ $? -eq 0 ]
@@ -265,7 +297,8 @@ start()
else
echo "failed"
return 1
- fi
+ fi
+
echo -n " Starting ccsd... "
start_ccsd
if [ $? -eq 0 ]
@@ -275,6 +308,7 @@ start()
echo "failed"
return 1
fi
+
echo -n " Starting cman... "
start_cman
if [ $? -eq 0 ]
@@ -296,16 +330,19 @@ start()
echo "failed"
return 1
fi
- echo -n " Starting fencing... "
- start_fence
- if [ $? -eq 0 ]
- then
- echo "done"
- else
- echo "failed"
- return 1
+
+ if fence_join_enabled; then
+ echo -n " Starting fencing... "
+ start_fence
+ if [ $? -eq 0 ]
+ then
+ echo "done"
+ else
+ echo "failed"
+ return 1
+ fi
fi
-
+
if fence_xvmd_enabled; then
echo -n " Starting virtual machine fencing host... "
start_fence_xvmd
@@ -412,6 +449,7 @@ stop_fence_xvmd()
stop()
{
echo "Stopping cluster: "
+
if fence_xvmd_enabled; then
echo -n " Stopping virtual machine fencing host... "
stop_fence_xvmd
@@ -422,16 +460,20 @@ stop()
echo "failed"
return 1
fi
- fi
- echo -n " Stopping fencing... "
- stop_fence
- if [ $? -eq 0 ]
- then
- echo "done"
- else
- echo "failed"
- return 1
fi
+
+ if fence_join_enabled; then
+ echo -n " Stopping fencing... "
+ stop_fence
+ if [ $? -eq 0 ]
+ then
+ echo "done"
+ else
+ echo "failed"
+ return 1
+ fi
+ fi
+
echo -n " Stopping cman... "
if [ $1 ]; then
stop_cman $1
@@ -445,8 +487,10 @@ stop()
echo "failed"
return 1
fi
-# stop_daemons
-# [ $? -ne 0 ] && return 1
+
+# stop_daemons
+# [ $? -ne 0 ] && return 1
+
echo -n " Stopping ccsd... "
stop_ccsd
if [ $? -eq 0 ]
@@ -456,6 +500,7 @@ stop()
echo "failed"
return 1
fi
+
echo -n " Unmounting configfs... "
stop_configfs
if [ $? -eq 0 ]
hooks/post-receive
--
Cluster Project