[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.05-25-g55ea749

rohara at sourceware.org rohara at sourceware.org
Mon Jul 28 15:50:47 UTC 2008


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=55ea74998e36f6f43380fdd3a8a15943b1123792

The branch, STABLE2 has been updated
       via  55ea74998e36f6f43380fdd3a8a15943b1123792 (commit)
      from  f6a63c92a24b867347491ba90fc1a80256efc08c (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 55ea74998e36f6f43380fdd3a8a15943b1123792
Author: Ryan O'Hara <rohara at redhat.com>
Date:   Mon Jul 28 10:49:44 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.in |   93 ++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 70 insertions(+), 23 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 1134e80..cc0618a 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -33,12 +33,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
@@ -58,6 +57,14 @@
 # higher elsewhere it will not be reduced here.
 [ -z "$NET_RMEM_MAX" ] && NET_RMEM_MAX=4194304
 
+# 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"
@@ -231,6 +238,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.
     #
@@ -249,6 +264,7 @@ fence_xvmd_enabled()
     return 0
 }
 
+<<<<<<< HEAD:cman/init.d/cman.in
 set_networking_params()
 {
     if [ ! -f  /proc/sys/net/core/rmem_default ]
@@ -269,6 +285,21 @@ set_networking_params()
     fi
 }
 
+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: "
@@ -286,6 +317,7 @@ start()
 			return 1
         fi
     fi
+
     echo -n "   Loading modules... "
     ulimit -c unlimited
     load_modules
@@ -296,6 +328,7 @@ start()
 	echo "failed"
 	return 1
     fi
+
     echo -n "   Mounting configfs... "
     start_configfs
     if [ $? -eq 0 ] 
@@ -304,7 +337,8 @@ start()
     else
 	echo "failed"
 	return 1
-    fi	
+    fi
+
     echo -n "   Setting network parameters... "
     set_networking_params
     if [ $? -eq 0 ] 
@@ -314,6 +348,7 @@ start()
 	echo "failed"
 	return 1
     fi
+
     echo -n "   Starting ccsd... "
     start_ccsd
     if [ $? -eq 0 ] 
@@ -323,6 +358,7 @@ start()
 	echo "failed"
 	return 1
     fi
+
     echo -n "   Starting cman... "
     start_cman
     if [ $? -eq 0 ] 
@@ -344,16 +380,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
@@ -460,6 +499,7 @@ stop_fence_xvmd()
 stop()
 {
     echo "Stopping cluster: "
+
     if fence_xvmd_enabled; then
 	echo -n "   Stopping virtual machine fencing host... "
 	stop_fence_xvmd
@@ -470,16 +510,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
@@ -493,8 +537,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 ]
@@ -504,6 +550,7 @@ stop()
 	echo "failed"
 	return 1
     fi
+
     echo -n "   Unmounting configfs... "
     stop_configfs
     if [ $? -eq 0 ]


hooks/post-receive
--
Cluster Project




More information about the Cluster-devel mailing list