cluster: RHEL6 - cman init: wait for dlm_controld to be fully operational before proceeding

Fabio M. Di Nitto fabbione at fedoraproject.org
Thu May 19 07:39:01 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a4e18590a5a5f9207c49ff1b5f4e340609bf76c6
Commit:        a4e18590a5a5f9207c49ff1b5f4e340609bf76c6
Parent:        25d93b389fd4d7ae72aa3eae2acd7cb67fd1749c
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Mon Mar 7 19:58:22 2011 +0100
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Thu May 19 09:38:38 2011 +0200

cman init: wait for dlm_controld to be fully operational before proceeding

this patch requires cabcd8334dff93f4a520eefda7b15cb26b495285 in order to operate
properly.

Resolves: rhbz#595725

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 cman/init.d/cman.in |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index b821826..258df48 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -609,7 +609,23 @@ stop_fenced()
 
 start_dlm_controld()
 {
-	start_daemon dlm_controld
+	start_daemon dlm_controld || return 1
+
+	if [ "$INITLOGLEVEL" = "full" ]; then
+		ok
+		echo -n "   Waiting dlm_controld to complete initialization: "
+	fi
+
+	retries=0
+	while ! dlm_tool ls >/dev/null 2>&1 && [ $retries -lt 10 ]; do
+		sleep 1
+		if [ "$INITLOGLEVEL" = "full" ]; then
+			echo -n "$retries "
+		fi
+		((retries++))
+	done
+
+	return 0
 }
 
 stop_dlm_controld()


More information about the cluster-commits mailing list