cluster: STABLE32 - cman init: allow dlm tcp port to be configurable via cman init script

Fabio M. Di Nitto fabbione at fedoraproject.org
Fri Sep 14 07:30:15 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0eae00792877a7a7b50b3323119296682e4f9097
Commit:        0eae00792877a7a7b50b3323119296682e4f9097
Parent:        6d380d530eb6f777ec6ab92a30de67a22772dc8c
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Fri Sep 14 09:29:19 2012 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Fri Sep 14 09:29:19 2012 +0200

cman init: allow dlm tcp port to be configurable via cman init script

Resolves: rhbz#857299

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 cman/init.d/cman.in               |   13 ++++++++-----
 cman/init.d/cman.init.defaults.in |    4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index e15144b..1917abd 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -119,12 +119,12 @@ fi
 # DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
 [ -z "$DLM_CONTROLD_OPTS" ] && DLM_CONTROLD_OPTS=""
 
-# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
-# Allow tuning of DLM kernel hash table sizes.
+# Allow tuning of DLM kernel config.
 # do NOT change unless instructed to do so.
 [ -z "$DLM_LKBTBL_SIZE" ] && DLM_LKBTBL_SIZE=""
 [ -z "$DLM_RSBTBL_SIZE" ] && DLM_RSBTBL_SIZE=""
 [ -z "$DLM_DIRTBL_SIZE" ] && DLM_DIRTBL_SIZE=""
+[ -z "$DLM_TCP_PORT" ] && DLM_TCP_PORT=""
 
 # FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
 #     complete.  If the join hasn't completed in this time, fence_tool join
@@ -775,7 +775,7 @@ leave_fence_domain()
 	fi
 }
 
-tune_dlm_hash_sizes()
+tune_dlm_config()
 {
 	dlmdir="/sys/kernel/config/dlm/cluster"
 
@@ -788,6 +788,9 @@ tune_dlm_hash_sizes()
 	[ -n "$DLM_DIRTBL_SIZE" ] && [ -f $dlmdir/dirtbl_size ] && \
 	  echo $DLM_DIRTBL_SIZE > $dlmdir/dirtbl_size
 
+	[ -n "$DLM_TCP_PORT" ] && [ -f $dlmdir/tcp_port ] && \
+	  echo $DLM_TCP_PORT > $dlmdir/tcp_port
+
 	return 0
 }
 	
@@ -866,9 +869,9 @@ start()
 		dlm_controld_enabled \
 		"Starting dlm_controld"
 
-	runwrap tune_dlm_hash_sizes \
+	runwrap tune_dlm_config \
 		none \
-		"Tuning DLM kernel hash tables"
+		"Tuning DLM kernel config"
 
 	gfs_controld_enabled && cd @INITDDIR@ && ./gfs2-cluster start
 
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
index 4525d70..e94f676 100644
--- a/cman/init.d/cman.init.defaults.in
+++ b/cman/init.d/cman.init.defaults.in
@@ -42,12 +42,12 @@
 # DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
 #DLM_CONTROLD_OPTS=""
 
-# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
-# Allow tuning of DLM kernel hash table sizes.
+# Allow tuning of DLM kernel config.
 # do NOT change unless instructed to do so.
 #DLM_LKBTBL_SIZE=""
 #DLM_RSBTBL_SIZE=""
 #DLM_DIRTBL_SIZE=""
+#DLM_TCP_PORT=""
 
 # FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
 #     complete.  If the join hasn't completed in this time, fence_tool join


More information about the cluster-commits mailing list