From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25033 invoked by alias); 31 Mar 2009 07:19:33 -0000 Received: (qmail 25025 invoked by alias); 31 Mar 2009 07:19:32 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: cluster: STABLE3 - cman init: implement groupd protocol negotiation check To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: f2403d0b27b164f575af8edcfd52ffe097d17e97 X-Git-Newrev: c685efb1ca60e907f1a1d36ba371ed8241c1586e From: "Fabio M. Di Nitto" Message-Id: <20090331071910.B26D9120358@lists.fedorahosted.org> Date: Tue, 31 Mar 2009 07:19:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00982.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c685efb1ca60e907f1a1d36ba371ed8241c1586e Commit: c685efb1ca60e907f1a1d36ba371ed8241c1586e Parent: f2403d0b27b164f575af8edcfd52ffe097d17e97 Author: Fabio M. Di Nitto AuthorDate: Tue Mar 31 09:17:58 2009 +0200 Committer: Fabio M. Di Nitto 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 --- 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()