All of lore.kernel.org
 help / color / mirror / Atom feed
From: adas@sourceware.org <adas@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cman/init.d cman
Date: 25 Aug 2006 22:04:43 -0000	[thread overview]
Message-ID: <20060825220443.8927.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	adas at sourceware.org	2006-08-25 22:04:42

Modified files:
	cman/init.d    : cman 

Log message:
	fix for bz 203167 and bz 202984. stop_fence was commented out. Now we do stop_fence before doing a cman_tool leave.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/init.d/cman.diff?cvsroot=cluster&r1=1.19&r2=1.20

--- cluster/cman/init.d/cman	2006/07/21 21:02:06	1.19
+++ cluster/cman/init.d/cman	2006/08/25 22:04:42	1.20
@@ -68,9 +68,10 @@
     if [ $? -ne 0 ]
     then
 	errmsg=$(/sbin/ccsd $CCSD_OPTS 2>&1)
+	rtrn=$?
 	# give ccsd time to start up before we start cman
 	sleep 1
-	return $?
+	return $rtrn
     fi
     return 0
 }
@@ -123,19 +124,61 @@
 
 start()
 {
-    echo -n "Starting cluster: "
+    echo "Starting cluster: "
+    echo -n "   Loading modules... "
     load_modules
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ] 
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+    echo -n "   Mounting configfs... "
     start_configfs
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ] 
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi	
+    echo -n "   Starting ccsd... "
     start_ccsd
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ] 
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+    echo -n "   Starting cman... "
     start_cman
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ] 
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+    echo -n "   Starting daemons... "
     start_daemons
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ] 
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+    echo -n "   Starting fencing... "
     start_fence
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ] 
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
     
     return 0
 }
@@ -206,28 +249,59 @@
     if /sbin/pidof fenced &> /dev/null
     then
 	/sbin/fence_tool leave > /dev/null 2>&1
-	return $?
+	rtrn=$?
+	sleep 1 # A bit of time for fenced to exit
+	return $rtrn
     fi
     return 0 # all ok
 }
 
 stop()
 {
-    echo -n "Stopping cluster: "
+    echo "Stopping cluster: "
+    echo -n "   Stopping fencing... "
+    stop_fence
+    if [ $? -eq 0 ]
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+    echo -n "   Stopping cman... "
     if [ $1 ]; then
 	stop_cman $1
     else
 	stop_cman
     fi
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ]
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
 #    stop_daemons
 #    [ $? -ne 0 ] && return 1
-    stop_fence
-#    [ $? -ne 0 ] && return 1
+    echo -n "   Stopping ccsd... "
     stop_ccsd
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ]
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+    echo -n "   Unmounting configfs... "
     stop_configfs
-    [ $? -ne 0 ] && return 1
+    if [ $? -eq 0 ]
+    then
+	echo "done"
+    else
+	echo "failed"
+	return 1
+    fi
+
     return 0
 }
 



             reply	other threads:[~2006-08-25 22:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-25 22:04 adas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-18 16:47 [Cluster-devel] cluster/cman/init.d cman adas
2007-12-11 14:04 pcaulfield
2007-12-11 11:22 pcaulfield
2007-07-17 16:10 rmccabe
2007-07-12 19:50 rmccabe
2007-05-10 21:45 rmccabe
2007-05-10 14:45 rmccabe
2007-05-10 14:36 rmccabe
2007-04-27 22:08 cfeist
2007-04-27 15:07 rmccabe
2006-12-08 22:01 adas
2006-12-08 22:01 adas
2006-11-15 16:55 lhh
2006-11-15 16:55 lhh
2006-11-15 16:54 lhh
2006-10-30 13:20 pcaulfield
2006-10-18 21:48 rpeterso
2006-10-04 20:32 rpeterso
2006-08-31 18:00 rohara
2006-07-21 21:02 rpeterso
2006-07-20 20:19 rpeterso
2006-06-28 20:57 adas

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=20060825220443.8927.qmail@sourceware.org \
    --to=adas@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.