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

Fabio M. Di Nitto fabbione at fedoraproject.org
Mon Mar 7 19:00:01 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4a14778e8bb739fb06abe575d5564b4a7e5079ad
Commit:        4a14778e8bb739fb06abe575d5564b4a7e5079ad
Parent:        cabcd8334dff93f4a520eefda7b15cb26b495285
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: Mon Mar 7 19:58:22 2011 +0100

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 3cef0df..7d9c7d1 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -645,7 +645,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