From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-26-gc1b276c
Date: 31 Mar 2008 15:08:44 -0000 [thread overview]
Message-ID: <20080331150844.32060.qmail@sourceware.org> (raw)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".
http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=c1b276c491b0d6e625035b5063532abc3ce23ca4
The branch, RHEL5 has been updated
via c1b276c491b0d6e625035b5063532abc3ce23ca4 (commit)
from 5cd4597c0fd297414389f5cab77a115425570d8a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c1b276c491b0d6e625035b5063532abc3ce23ca4
Author: Lon Hohberger <lhh@redhat.com>
Date: Fri Mar 7 14:26:50 2008 -0500
[CMAN] Make cman init script start qdiskd intelligently
Resolves qdiskd/cman start ordering so gfs file systems
are mounted reliably in 1-node+qdisk boot situations.
-----------------------------------------------------------------------
Summary of changes:
cman/init.d/cman | 32 ++++++++++++++++++++++++++++++++
cman/init.d/qdiskd | 21 +++++++++++++++++++--
2 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/cman/init.d/cman b/cman/init.d/cman
index be26226..e138798 100755
--- a/cman/init.d/cman
+++ b/cman/init.d/cman
@@ -97,6 +97,35 @@ start_cman()
return 0
}
+
+start_qdiskd()
+{
+ declare current_runlevel
+
+ current_runlevel=$(/sbin/runlevel 2>/dev/null | awk '{ print $2 }' 2>/dev/null)
+ #
+ # Start qdiskd before fenced to resolve bug #436381. This only
+ # happens if qdiskd is configured to run in the runlevel we are in
+ #
+ /sbin/chkconfig --levels "$current_runlevel" qdiskd 2>/dev/null
+ if [ $? -ne 0 ]; then
+ # qdiskd doesn't start at this runlevel.
+ return 0
+ fi
+
+ echo -n " Starting qdiskd... "
+ /sbin/service qdiskd start &> /dev/null
+ if [ $? -eq 0 ]
+ then
+ echo "done"
+ else
+ echo "failed"
+ return 1
+ fi
+ return 0
+}
+
+
start_daemons()
{
status groupd &> /dev/null
@@ -255,6 +284,9 @@ start()
echo "failed"
return 1
fi
+
+ start_qdiskd
+
echo -n " Starting daemons... "
start_daemons
if [ $? -eq 0 ]
diff --git a/cman/init.d/qdiskd b/cman/init.d/qdiskd
index f1c02aa..0a2c97a 100755
--- a/cman/init.d/qdiskd
+++ b/cman/init.d/qdiskd
@@ -19,9 +19,26 @@ retries=0
# See how we were called.
case "$1" in
start)
- action "Starting the Quorum Disk Daemon:" qdiskd -Q
+ echo -n "Starting the Quorum Disk Daemon:"
+
+ $0 status >/dev/null
+ if [ $? -eq 0 ]; then
+ echo_success
+ echo
+ exit 0
+ fi
+
+ qdiskd -Q
rtrn=$?
- [ $rtrn = 0 ] && touch $LOCK_FILE
+ if [ $rtrn = 0 ]; then
+ touch $LOCK_FILE
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+
;;
stop)
hooks/post-receive
--
Cluster Project
reply other threads:[~2008-03-31 15:08 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=20080331150844.32060.qmail@sourceware.org \
--to=lhh@sourceware.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.