From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] unfencing
Date: Thu, 26 Feb 2009 15:35:44 -0600 [thread overview]
Message-ID: <20090226213544.GA17809@redhat.com> (raw)
In-Reply-To: <20090220214431.GC23911@redhat.com>
On Fri, Feb 20, 2009 at 03:44:32PM -0600, David Teigland wrote:
> init.d/cman would run:
> cman_tool join
> fence_node -U <ourname>
How does this look? I'm not up on the ins and outs of init scripts.
In the common case, no unfencing will happen, and nothing is printed.
If unfencing is defined and fails, the whole script exits with failure.
That's important for fence_scsi, but not necessarily for other forms
of unfencing... should we make that behavior conditional on fence_scsi?
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 9303a0b..b8303cb 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -236,6 +236,25 @@ start_cman()
return 0
}
+unfence_self()
+{
+ fence_node -U > /dev/null 2>&1
+ error=$?
+
+ if [ $error -eq 0 ]
+ then
+ echo " Unfencing self... done"
+ return 0
+ else
+ if [ $error -eq 1 ]
+ then
+ echo " Unfencing self... failed"
+ return 1
+ else
+ return 0
+ fi
+ fi
+}
start_qdiskd()
{
@@ -502,6 +521,12 @@ start()
return 1
fi
+ unfence_self
+ if [ $? -eq 1 ]
+ then
+ return 1
+ fi
+
start_qdiskd
echo -n " Starting daemons... "
next prev parent reply other threads:[~2009-02-26 21:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-20 21:44 [Cluster-devel] unfencing David Teigland
2009-02-23 6:27 ` Fabio M. Di Nitto
2009-02-23 18:15 ` David Teigland
2009-02-23 18:31 ` Fabio M. Di Nitto
2009-02-23 18:40 ` David Teigland
2009-02-23 18:52 ` Fabio M. Di Nitto
2009-02-23 19:09 ` David Teigland
2009-02-23 19:22 ` Ryan O'Hara
2009-02-23 19:27 ` David Teigland
2009-02-23 20:24 ` Ryan O'Hara
2009-02-23 20:28 ` David Teigland
2009-02-26 6:51 ` Fabio M. Di Nitto
2009-02-26 14:33 ` David Teigland
2009-02-26 18:06 ` [Cluster-devel] unfencing (cman startup) Fabio M. Di Nitto
2009-02-27 12:54 ` Chrissie Caulfield
2009-02-27 15:52 ` David Teigland
2009-02-27 16:27 ` Chrissie Caulfield
2009-02-27 17:46 ` Fabio M. Di Nitto
2009-03-02 7:59 ` Chrissie Caulfield
2009-02-23 19:36 ` [Cluster-devel] unfencing Ryan O'Hara
2009-02-23 19:44 ` David Teigland
2009-02-26 21:35 ` David Teigland [this message]
2009-02-27 7:04 ` Fabio M. Di Nitto
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=20090226213544.GA17809@redhat.com \
--to=teigland@redhat.com \
/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.