From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] cman init: fix start sequence error handling
Date: Fri, 30 Mar 2012 10:07:09 +0200 [thread overview]
Message-ID: <1333094829-4833-2-git-send-email-fdinitto@redhat.com> (raw)
In-Reply-To: <1333094829-4833-1-git-send-email-fdinitto@redhat.com>
From: "Fabio M. Di Nitto" <fdinitto@redhat.com>
Any daemon that fails to start would leave no traces.
the problem with cman init is that we need to handle multiple daemons
and tools. If one in the chain fails, we never reverted to the original
state of the system. This can indeed cause other issues.
Fix the init script to "stop" cman if any error happens during "start.
Resolves: rhbz#806002
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
cman/init.d/cman.in | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index d0c6f70..a39f19f 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -19,6 +19,9 @@
# set secure PATH
PATH="/bin:/usr/bin:/sbin:/usr/sbin:@SBINDIR@"
+# save invokation for rollback ops
+thisinvokation="$0"
+
chkconfig2()
{
case "$1" in
@@ -199,6 +202,9 @@ nok() {
echo -e "$errmsg"
failure
echo
+ if [ "$currentaction" = "start" ]; then
+ $thisinvokation stop
+ fi
exit 1
}
@@ -744,6 +750,7 @@ leave_fence_domain()
start()
{
+ currentaction="start"
breakpoint="$1"
sshd_enabled && cd @INITDDIR@ && ./sshd start
--
1.7.7.6
next prev parent reply other threads:[~2012-03-30 8:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 8:07 [Cluster-devel] [PATCH 1/2] config: update relax ng schema to include totem miss_count_const Fabio M. Di Nitto
2012-03-30 8:07 ` Fabio M. Di Nitto [this message]
2012-03-30 8:18 ` [Cluster-devel] [PATCH 2/2] cman init: fix start sequence error handling Christine Caulfield
2012-03-30 8:18 ` [Cluster-devel] [PATCH 1/2] config: update relax ng schema to include totem miss_count_const Christine Caulfield
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=1333094829-4833-2-git-send-email-fdinitto@redhat.com \
--to=fdinitto@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).