From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/5] rgmanager: Don't exit uncleanly when cman asks us to shut down.
Date: Wed, 04 Jul 2012 13:05:39 +0200 [thread overview]
Message-ID: <4FF42383.5020702@redhat.com> (raw)
In-Reply-To: <20120628195732.GA79995@redhat.com>
ACK
On 6/28/2012 9:57 PM, Ryan McCabe wrote:
> Original patch from Lon rediffed to apply to the current tree:
>
> "Previous to this, rgmanager would uncleanly exit if you
> issued a 'service cman stop'. This patch makes it uncleanly
> exit if 'cman_tool leave force' or a corosync/openais crash
> occurs, but in a simple cman_tool leave, rgmanager will no
> longer exit uncleanly."
>
> Without this patch, issuing 'service cman stop' when rgmanager
> is running will make it impossible to stop the cman service because
> rgmanager will have exited without releasing its dlm lockspace.
>
> Resolves: rhbz#769730
>
> Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
> ---
> rgmanager/src/clulib/msg_cluster.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
> index 8dc22d0..e864853 100644
> --- a/rgmanager/src/clulib/msg_cluster.c
> +++ b/rgmanager/src/clulib/msg_cluster.c
> @@ -211,7 +211,7 @@ poll_cluster_messages(int timeout)
>
> if (cman_dispatch(ch, 0) < 0) {
> process_cman_event(ch, NULL,
> - CMAN_REASON_TRY_SHUTDOWN, 0);
> + CMAN_REASON_TRY_SHUTDOWN, 1);
> }
> ret = 0;
> }
> @@ -987,6 +987,11 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg)
> printf("EVENT: %p %p %d %d\n", handle, private, reason, arg);
> #endif
>
> + if (reason == CMAN_REASON_TRY_SHUTDOWN && !arg) {
> + cman_replyto_shutdown(handle, 0);
> + return;
> + }
> +
> /* Allocate queue node */
> while ((node = malloc(sizeof(*node))) == NULL) {
> sleep(1);
>
prev parent reply other threads:[~2012-07-04 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 19:57 [Cluster-devel] [PATCH 2/5] rgmanager: Don't exit uncleanly when cman asks us to shut down Ryan McCabe
2012-07-04 11:05 ` 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=4FF42383.5020702@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.