This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - cman init: implement groupd protocol negotiationcheck
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Tue, 31 Mar 2009 07:19:10 +0000 (UTC)
- Subject: cluster: STABLE3 - cman init: implement groupd protocol negotiationcheck
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c685efb1ca60e907f1a1d36ba371ed8241c1586e
Commit: c685efb1ca60e907f1a1d36ba371ed8241c1586e
Parent: f2403d0b27b164f575af8edcfd52ffe097d17e97
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Tue Mar 31 09:17:58 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Mar 31 09:17:58 2009 +0200
cman init: implement groupd protocol negotiation check
as discussed with David, wait for groupd to negotiate the compat protocol.
this check is non-fatal but could be very informative when running
in full log for debugging.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/init.d/cman.in | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 3324268..5105173 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -490,7 +490,21 @@ stop_qdiskd()
start_groupd()
{
- start_daemon groupd
+ start_daemon groupd || return 1
+
+ if [ "$INITLOGLEVEL" = "full" ]; then
+ ok
+ echo -n " Waiting groupd protocol negotiation: "
+ fi
+ retries=0
+ while group_tool ls | \
+ grep -q pending && [ $retries -lt 10 ]; do
+ sleep 1
+ if [ "$INITLOGLEVEL" = "full" ]; then
+ echo -n "$retries "
+ fi
+ ((retries++))
+ done
}
stop_groupd()