Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   cman init: make sure we start after fence_sanlockd and warn users (http://www.linux-archive.org/cluster-development/710777-cman-init-make-sure-we-start-after-fence_sanlockd-warn-users.html)

"Fabio M. Di Nitto" 10-09-2012 09:36 AM

cman init: make sure we start after fence_sanlockd and warn users
 
From: "Fabio M. Di Nitto" <fdinitto@redhat.com>

Resolves: rhbz#509056

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/init.d/cman.in | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index a88f52f..849739b 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -8,8 +8,8 @@
#
### BEGIN INIT INFO
# Provides: cman
-# Required-Start: $network $time
-# Required-Stop: $network $time
+# Required-Start: $network $time fence_sanlockd
+# Required-Stop: $network $time fence_sanlockd
# Default-Start:
# Default-Stop:
# Short-Description: Starts and stops cman
@@ -740,6 +740,13 @@ stop_cmannotifyd()
stop_daemon cmannotifyd
}

+fence_sanlock_check()
+{
+ service fence_sanlockd status > /dev/null 2>&1 &&
+ echo " fence_sanlockd detected. Unfencing might take several minutes!"
+ return 0
+}
+
unfence_self()
{
# fence_node returns 0 on success, 1 on failure, 2 if unconfigured
@@ -881,6 +888,8 @@ start()

[ "$breakpoint" = "daemons" ] && exit 0

+ fence_sanlock_check
+
runwrap unfence_self
none
"Unfencing self"
--
1.7.7.6


All times are GMT. The time now is 04:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.