A new user interface for you! Read more...

File cman_init_wait_for_dlm_controld_to_be_fully_operational_before_proceeding.patch of Package cluster

commit feb89a59bc35b13a4608957bb12395fccd77de4b
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   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@redhat.com>

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index e8eba61..a9c1dfa 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -585,7 +585,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()