cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Christine Caulfield <ccaulfie@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 09:18:40 +0100	[thread overview]
Message-ID: <4F756C60.4040009@redhat.com> (raw)
In-Reply-To: <1333094829-4833-2-git-send-email-fdinitto@redhat.com>

ACK

Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>

On 30/03/12 09:07, Fabio M. Di Nitto wrote:
> 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



  reply	other threads:[~2012-03-30  8:18 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 ` [Cluster-devel] [PATCH 2/2] cman init: fix start sequence error handling Fabio M. Di Nitto
2012-03-30  8:18   ` Christine Caulfield [this message]
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=4F756C60.4040009@redhat.com \
    --to=ccaulfie@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).