All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] rgmanager: Fix dependency restart bug [RHEL5]
Date: Wed, 12 Oct 2011 08:39:06 +0200	[thread overview]
Message-ID: <4E95360A.1020202@redhat.com> (raw)
In-Reply-To: <1318374125-7226-1-git-send-email-lhh@redhat.com>

ACK

don?t we need a RHEL-6 counter part for this BZ?

Fabio

On 10/12/2011 1:02 AM, Lon Hohberger wrote:
> If we:
>  - had a service with 'depend' set on another
>    service,
>  - both services were running on the same host,
>  - that host died, and
>  - the service which depended on the other service
>    also had the 'restart' recovery policy,
> 
> rgmanager would enter handle_start_req and return
> an immediate error - with no further recovery action
> performed.
> 
> Resolves: rhbz#743442
> 
> Signed-off-by: Lon Hohberger <lhh@redhat.com>
> ---
>  rgmanager/src/daemons/rg_state.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
> index dce28db..c02bfda 100644
> --- a/rgmanager/src/daemons/rg_state.c
> +++ b/rgmanager/src/daemons/rg_state.c
> @@ -2131,8 +2131,16 @@ handle_start_req(char *svcName, int req, int *new_owner)
>  
>  	/* Check for dependency.  We cannot start unless our
>  	   dependency is met */
> -	if (check_depend_safe(svcName) == 0)
> +	if (check_depend_safe(svcName) == 0) {
> +		if (req == RG_START_RECOVER) {
> +			clulog(LOG_INFO, "Dependency for %s missing "
> +			       "during recovery; marking as stopped",
> +			       svcName);
> +
> +			_svc_stop_finish(svcName, 0, RG_STATE_STOPPED);
> +		}
>  		return RG_EDEPEND;
> +	}
>  	
>  	/*
>  	 * This is a 'root' start request.  We need to clear out our failure



      reply	other threads:[~2011-10-12  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 23:02 [Cluster-devel] [PATCH] rgmanager: Fix dependency restart bug [RHEL5] Lon Hohberger
2011-10-12  6:39 ` Fabio M. Di Nitto [this message]

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=4E95360A.1020202@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 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.