This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - cman init: integrate ocfs2_controld.cman startup
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Thu, 3 Sep 2009 05:31:52 +0000 (UTC)
- Subject: cluster: STABLE3 - cman init: integrate ocfs2_controld.cman startup
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"