public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - cman init: integrate ocfs2_controld.cman startup
@ 2009-09-03  5:32 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-09-03  5:32 UTC (permalink / raw)
  To: cluster-cvs-relay

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"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-03  5:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03  5:32 cluster: STABLE3 - cman init: integrate ocfs2_controld.cman startup Fabio M. Di Nitto

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).