From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5659 invoked by alias); 3 Sep 2009 05:32:20 -0000 Received: (qmail 5650 invoked by alias); 3 Sep 2009 05:32:19 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.9 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 bastion2.fedora.phx.redhat.com Subject: cluster: STABLE3 - cman init: integrate ocfs2_controld.cman startup 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: 03a04c47891c30dea49a8aaa3c7ed596d9048022 X-Git-Newrev: 77d871cbdd4722f91a50b374dccf6e39a3b3c9e7 From: "Fabio M. Di Nitto" Message-Id: <20090903053152.645E2120209@lists.fedorahosted.org> Date: Thu, 03 Sep 2009 05:32:00 -0000 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 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-q3/txt/msg00290.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=77d871cbdd4722f91a50b374dccf6e39a3b3c9e7 Commit: 77d871cbdd4722f91a50b374dccf6e39a3b3c9e7 Parent: 03a04c47891c30dea49a8aaa3c7ed596d9048022 Author: Fabio M. Di Nitto AuthorDate: Thu Sep 3 07:29:01 2009 +0200 Committer: Fabio M. Di Nitto CommitterDate: Thu Sep 3 07:29:01 2009 +0200 cman init: integrate ocfs2_controld.cman startup with the most recent ocfs2-tools, it is possible to mount ocfs2 using a cman cluster. This change address the scenario where o2cb starts before cman. In that specific case ocfs2_controld.cman will fail to start from o2cb because cman is not yet available. Check if o2cb is running and configured as cman cluster, if so attempt to start ocfs2_controld.cman. Signed-off-by: Fabio M. Di Nitto --- cman/init.d/cman.in | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in index 050bfe7..ed5a756 100644 --- a/cman/init.d/cman.in +++ b/cman/init.d/cman.in @@ -339,6 +339,13 @@ groupd_enabled() return 0 } +ocfs2_enabled() +{ + ocfs2_cluster="$(cat /sys/fs/ocfs2/cluster_stack 2>/dev/null || true)" + [ "$ocfs2_cluster" != cman ] && return 1 + return 0 +} + cmannotifyd_enabled() { case "$CMAN_NOTIFYD_START" in @@ -614,6 +621,11 @@ stop_gfs_controld() stop_daemon gfs_controld } +start_ocfs2_controld() +{ + start_daemon ocfs2_controld.cman +} + start_cmannotifyd() { start_daemon cmannotifyd @@ -721,6 +733,10 @@ start() none \ "Starting gfs_controld" + runwrap start_ocfs2_controld \ + ocfs2_enabled \ + "Starting ocfs2_controld" + runwrap start_cmannotifyd \ cmannotifyd_enabled \ "Starting cmannotifyd"