public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - cman init: integrate ocfs2_controld.cman startup
Date: Thu, 03 Sep 2009 05:32:00 -0000	[thread overview]
Message-ID: <20090903053152.645E2120209@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=77d871cbdd4722f91a50b374dccf6e39a3b3c9e7
Commit:        77d871cbdd4722f91a50b374dccf6e39a3b3c9e7
Parent:        03a04c47891c30dea49a8aaa3c7ed596d9048022
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Thu Sep 3 07:29:01 2009 +0200
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
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 <fdinitto@redhat.com>
---
 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"


                 reply	other threads:[~2009-09-03  5:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090903053152.645E2120209@lists.fedorahosted.org \
    --to=fabbione@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).